These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Default values in dropdown

Amie
Registered: Sep 7 2009
Posts: 17

hi all,

I've a requirement wherin i have a dropdown field and if the user doesn't fill the field it has to automatically take a default value "QU" when the form is saved.

Can anybody provide me pointer or code for doing this.

I've tried using this .... in the event Presave...but doesn't work.
if ( $.rawValue == "null" )then
$.rawValue = "QU"
else
$.rawValue
endif

Regards,
Amie

suewhitehead
Registered: Jun 3 2008
Posts: 232
This should work for you:

if ($.rawValue == " " )then
$.rawValue = "QU"
endif

Put it on the MouseExit action. And of course remember to set FormCalc as the Language.
Notice that I only used the quotation marks with a space between them to stand for null.

You don't need the else statement since the If statement implies that only if the condition in the IF statement is met will it come into play. Otherwise the field will have whatever is entered.
Amie
Registered: Sep 7 2009
Posts: 17
This doesnt seem to be working...
I've written it in mouseexit event but its not updating in the backend.

Can you provide more points.

Regards,
Amie
suewhitehead
Registered: Jun 3 2008
Posts: 232
Sorry. Not sure what to tell you since it works for me. I am not sure what you mean by "not updating in the backend."