The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Display Field Message

Blaze2
Kilo Guru

I want to display a message when the user selects I am not sure.

find_real_file.png

Currently the message displays no matter which choice is made

find_real_file.png

I am not sure how to select the choice that I want so that the message populates.

This is the script that I am using

find_real_file.png

function onChange(control, oldValue, newValue, isLoading) {

    if (isLoading || newValue == '') {

          return;

    }

  //Type appropriate comment here, and begin script below

    g_form.showFieldMsg('why_form_needed','If you are not sure why the form is needed, please verify with supervisor','info');

}

Finally I want to deny submitting the form until that choice changes to New Form or Update existing form.

1 ACCEPTED SOLUTION

function onChange(control, oldValue, newValue, isLoading) {


    if (isLoading || newValue == '') {


          return;


    }



if(g_from.getValue("why_form_needed")=="actual value of select box choice"){


  //Type appropriate comment here, and begin script below


    g_form.showFieldMsg('why_form_needed','If you are not sure why the form is needed, please verify with supervisor','info');


return false;


}



}




please try the above code and replace the "actual value of select box choice" of "I am not sure" question choice in   the variable "why_form_needed".



Let me if this helps.



Thanks


Gaurav


View solution in original post

7 REPLIES 7

Hi Blaze



At line 6 it is g_form not g_from



Thanks


Adi


Thanks Adi,



It is working, but if a user makes a mistake and chose I am unsure and instead wanted to use Update existing form, the message stays in place.



find_real_file.png


Hi blaze



try adding this befor if condition



g_form.hideFieldMsg('why_form_needed',true);



Thanks,


Adi