Expand my Community achievements bar.

SOLVED

how to overwrite certain drop down menu items

Avatar

Level 2

Hi,

i have a dropdown menu where i disabled custom text entry. the last item in the dropdown is the "Other" option where I want the user to write extra details. I was wondering if there's a way to pop up a text field when the "Other" option is selected.

Also, the dropdown field stretches all the way across the page..so when the "Other" option is chosen, would it be possible to automatically shrink the field to fit a text field next to it for the user to type in details.

I'm not sure if there's a better way to do this....any help would be much appreciated!

thanks!!

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Hopefully you will get it working soon.

I suspect that the form is not saved as Dynamic:

Parallels Desktop2.png

Other than that, double check the that the object references in the script matches the objects in the forms, including subforms if objects are in different subforms.

If you could share the problem it would help finding the problem.

Niall

View solution in original post

7 Replies

Avatar

Level 2

thanks again niall for your reply!

i really like option 1..where there's a hidden field

but i have multiple Others in my dropdown menu..is there a way to group all the others together instead of writing them out one by one, like "this.rawValue == "Other1" || this.rawValue == "Other2"....etcetc"

thanks!

Avatar

Level 2

o i figured it out...i just had to assign binding values to it!

but i'm having trouble doing option 1 for my form..i have the exact same coding and field settings as yours but i cant seem to work..i even tried to make it a dynamic form but still no luck. do you have any suggestions for me?

Avatar

Level 10

Hi,

The if statement is based on one of the items being "Other". If this does not exist then the script will not work.

Also if you set the dropdown to have a binding (Object > Binding tab) then you need to set the if statement to test against the bound value rather than the displayed value. For example if the "Other" is bound to "4", then the if statement would look like:

if (this.rawValue == "4")

{

     ...

Good luck,

Niall

Avatar

Level 2

Hi,

I coded the fields and copied it to a new form and it worked..but it won't work on the original form...what's the reason for it??

Avatar

Correct answer by
Level 10

Hi,

Hopefully you will get it working soon.

I suspect that the form is not saved as Dynamic:

Parallels Desktop2.png

Other than that, double check the that the object references in the script matches the objects in the forms, including subforms if objects are in different subforms.

If you could share the problem it would help finding the problem.

Niall