cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reset or Clear a Field based on a condition of another in a different panel.

I have created a form that consisted of multiple panels.  I need to have some of my fields in Panel 2 to be reset or clear out if a field, "Form Type", inside Panel 1 says "New Form".  Panel 2 is built to be hidden unless the "Form Type" field in Panel 1 says, "Conversion".  Would someone be able to assist me with accomplishing this?  I'm new to the community.  Thank you!

Labels: (1)
0 Kudos
Reply
3 Replies
Workflow Hero

Re: Reset or Clear a Field based on a condition of another in a different panel.

what's the type of 'Form Type' field? lookup, choice ...?

the solution will vary based on that.

some examples you can find here I want to reset the option button values based on another option button value

0 Kudos
Accept as Solution Reply
Not applicable

Re: Reset or Clear a Field based on a condition of another in a different panel.

Hi Maria.  Thank you for your response.  So sorry I wasn't as detailed as I could have (rookie's mistake).  The Form Type is a dropdown.  Panel 2 contains fields that are both dropdown as well as single line textbox.

A co-worker of mine has assisted me with researching a solution and he's pieced together  javascript codes from a few resources and came up with a solution.  I would like to share it just in case it is useful for another user.  Please see below.

The first part is to go into the field settings and change the Store Client ID in JV variable setting to "yes". Then, copy field's control name and add "ID" in the Client ID JV variable name field .  This is done for each of the fields that are going to be applicable to this function.

The second part is dropping the JV code below into the Custom JV of the Form settings.

NWF$(document).ready(function(){

  NWF$('#'+TypeofFormID).change(function() {TypeofFormValueChanged()});

});

function TypeofFormValueChanged() {

  NWF$('#'+ExistingFormatID).val('');

  NWF$('#'+FormDataCurrentlyStoredID).val('');

  NWF$('#'+CurrentLocationID).val('');

  NWF$('#'+DataLocationID).val('');

}

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Reset or Clear a Field based on a condition of another in a different panel.

glad you get it working.

mark the thread answered

0 Kudos
Accept as Solution Reply