How To Reset All Fields Values

sushil sinha
Giga Contributor

I want to reset value of all fields once I click on reset button.

It should reset all the fields including text box drop down etc.

 

 

2 REPLIES 2

sriram9
Giga Contributor

To delete the values of the fields, we can use the following methods:

use g_form.clearoptions() to disable the values from choice lists and

use g_form.clearvalue(fieldname) to clear the value of the field.  Create a UI action with the button named "Reset" and write code using the mentioned commands.

 

Hope this helps.

Hi,

This is not working for drop down.

Please find the script for UI action below:

 

function reset() {
//x_58872_needit_needit
g_form.clearoptions();
}