(g_form.getValue) and Check Boxes

Hakim
Kilo Expert

Hello I have a requirement to display a pop up message on a change form based on the selection of a value

(X) Inform Third Party, which then in the back end triggers that third party to review a change. I want the message to appear when selected to the tune of something like : Selection here requests a review from Third party. I've gather thus far I can use function onLoad() and (g_form.getValue) to check if the box was selected, and possibly  g_form.addWarningMessage(new GwtMessage().getMessage, Can someone assist with the appropriate formatting of this script to achieve my goal?

Thanks  

1 ACCEPTED SOLUTION

Thanks for checking back, I did get back around to this and yes it's working perfectly now. Thanks for your assistance!! 

View solution in original post

4 REPLIES 4

Inactive_Us1180
Kilo Guru

Hey Hakim, are you using this on a catalog item? or on a normal form? 

also you could use an onLoad, or it seems like an onChange() might work better so your users can get the alert as soon as they click the check box. 

 

it would be something like this. 

 

var check = g_form.getValue("<field name>");

if(check == 'true'){

//this will show a message near the field

g_form.showFieldMsg("<field name>", "Message you want to display to the user","info");

 

//this will give the user a popup message

alert("message you want to display to the user");

}

 

Hakim
Kilo Expert

this is going on the Change form. 

Hey Hakim, just following up to make sure you were able to get this working or if you needed some additional help.

 

Thanks for checking back, I did get back around to this and yes it's working perfectly now. Thanks for your assistance!!