Reset drop down box to it's default blank state

  • 1 October 2018
  • 4 replies
  • 5 views

Userlevel 2
Badge +9

I have a form that requires a Yes/No drop down answer.  I was wondering if there was way to reset the answer back to a blank value once the form is saved.  Essentially that Yes/No answer is what will kick off a workflow after the form is saved.  I thought about using a Yes/No check box, but I need to make sure an answer is selected when filling out the form.  That was the reason I thought a drop down selection would work.  I've tried inserting a set field value for the drop down to blank by either having no value entered or using "".  That didn't seem to work. Maybe I'm not using the correct workflow action to change this value.  Any assistance here would be appreciated. Thanks


4 replies

Badge +1

You could try adding a custom function that executes on Submit Button click:

Function caller:
resetDD(dropdownJS,';#**SelectValue**');


function resetDD(field, value){
NWF$(NWF$('#' + dropdownJS).siblings('select')[0]).val(NWF.RuntimeFunctions.parseLookup(value, true));
NWF$('#' + dropdownJS).val(value);
}
Userlevel 2
Badge +9

Though the problem would be I need that to say Yes, so a specific workflow is fired. I think I have a solution. I’ll create an answer named “Please select an answer” and make that the default choice. Once the workflow is ran the answer is switched back to the “Please select an answer” answer.

Brian Knight

Director of Information Technology

Hamilton County Developmental Disabilities Services

W: 513-559-6678

C: 859-250-5819

Userlevel 1
Badge +5

Hi Brian,

Have you tried setting the default value :

Hope this can help you

Regards,
Reva Eka Patria

Userlevel 2
Badge +9

That is kind of what I did. I just set the default choice to "Please Select a Value".  Then at the end of the Workflow, I changed whatever the user entered back to "Please Select a Value".  I also set a validation rule to the answer of "Please Select a Value" or blank. 

219361_pastedImage_1.png

 219368_pastedImage_2.png

Reply