Field message Hide once entered the value

subramani
Mega Contributor

Hello,

I want to display the field message but once user entered the field value, the info message shouldn't be there.

Please help me to get this done.

1 ACCEPTED SOLUTION

Harish KM
Kilo Patron
Kilo Patron

Try this


//tested


function onLoad() {


    //Type appropriate comment here, and begin script below


    var getField = g_form.getValue('u_num1');//u_num1 is field name


  if(getField =='')


  {


  g_form.showFieldMsg('u_num1','Test');


  }


else if(getField!='')


  {


  g_form.hideFieldMsg('u_num1', true);


  }


}



find_real_file.png



find_real_file.png


Regards
Harish

View solution in original post

5 REPLIES 5

Harish KM
Kilo Patron
Kilo Patron

Try this


//tested


function onLoad() {


    //Type appropriate comment here, and begin script below


    var getField = g_form.getValue('u_num1');//u_num1 is field name


  if(getField =='')


  {


  g_form.showFieldMsg('u_num1','Test');


  }


else if(getField!='')


  {


  g_form.hideFieldMsg('u_num1', true);


  }


}



find_real_file.png



find_real_file.png


Regards
Harish

Harish KM
Kilo Patron
Kilo Patron

Did you try the above code?


Regards
Harish

Thanks Harish


Check this thread to mark answer correct


How To Mark Answers Correct From Community Inbox


Regards
Harish