How can I make a checkbox actually mandatory in service catalog?

santrym
Mega Expert

I have a checkbox that says "check this box if you agree to the policy terms...". I made the variable "mandatory", but I can still click "order now" even when the checkbox is not checked. How can I make it so you can only "order now" after the checkbox has been clicked?

1 ACCEPTED SOLUTION

getValue() return the value as string. Try this



function onSubmit() {


    //Type appropriate comment here, and begin script below SpaceIsThePlace


    if (g_form.getValue('PolicyAgreement')=='false') {



  g_form.showFieldMsg('PolicyAgreement', 'You must check the Policy Agreement checkbox', 'error');



  return false;


    }


}


View solution in original post

12 REPLIES 12

I forgot my standard disclaimer (again). I need a macro for that.


Chuck, I feel bad! You keep giving me solid answers for my questions that are almost exactly what I'm looking for, but then someone else swoops in with a slightly better answer, so you keep getting robbed of the "correct answer" tag. I'll make it up to you someday.


Not to worry Michael. Abhinay and others are quite brilliant. The most important thing is that you get your questions answered and your issues resolved.


Glad I could help you


Thank you! Abhinay.