Jump to content
  • 0

Dropdown - Limittolist Workaround


Scottster

Question

I have a dropdown field that I want to be able to enter a custom value.  I do not want this value to be added to the table.  In Microsoft Access, there is an option to 'LimitToList = false'.  So instead, I created a Virtual field with the dropdown options.  I also have the actual field called 'ItemName'.  If someone uses the dropdown, the option will be copied to the 'ItemName' field.  If they want to enter a custom value, they can simply fill in the 'ItemName' field.  Here is my script:

 

<script>
function EnterCustomValue()
{
 var v_standardOption = document.getElementsByName("cbParamVirtual1")[0];

 document.getElementById("insertRecorditemName").value = v_standardOption;
}
document.getElementById("cbParamVirtual1").addEventListener("change", EnterCustomValue);

</script>

 

If the dropdown is used, it gives me an error saying the filed is empty.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Can you change

 

var v_standardOption = document.getElementsByName("cbParamVirtual1")[0]; to var v_standardOption = document.getElementsByName("cbParamVirtual1")[0].value;

 

and see if that  helps?

 

You can also use this solution: http://howto.caspio.com/tech-tips-and-articles/advanced-customizations/add-an-option-to-a-public-facing-dropdown/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...