Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Show field message when check box is true in catalog item

viswanathka
Tera Contributor

I need a field message for a check box,if the checkbox is true in catalog item it should show a field message. Can anyone suggest how to achieve this?

3 REPLIES 3

Ravi Chandra_K
Kilo Patron

Hi @viswanathka 

Greetings!

you can write on change on checkbox variable.

 

function onChange(control, oldValue, newValue, isLoading) {
 
var message = 'Your message here';
g_form.showFieldMsg('variableName', message,'info');
 
}

Please hit the thumb and Mark as correct based on Impact!!

 

Kind Regards,

Ravi Chandra.

Kiran_45
Giga Guru

Hi @viswanathka ,
Use the below code in catalog client script

if (newValue == 'true') {
        g_form.showFieldMsg('Field_Name', "Message", 'info');
    }

 

Regards,

Kiran

Samaksh Wani
Giga Sage

Hello @viswanathka 

 

 

var msg = "type ur msg";
var check = g_form.getValue('check_box_field_name')
if(check == 'true'){
g_form.showFieldMessage('check_box_field_name', msg, 'info');
}

 

 

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Samaksh