Notifications

49 views

Description

Checking correctly a null condition for a field in a form using a Client Script "if" block can fail.

 

Cause

Trying to check the value directly using the form field's name is not a valid practice. The valid method is using g_form.getValue('<name_of_the_field'>).

 

Resolution

In order to check the value of a field in a form, use the following:
 
if(g_form.getValue('<name_of_the_field>' == "")) 

instead of:

if('<name_of _the_field>' == "") 

 

Article Information

Last Updated:2019-09-17 00:22:56
Published:2019-09-17