How to add Help Text or Information (i) on select box choices of variable

Ankur6
Kilo Contributor

Hi All,

Urgent Requirement,

I have select box variable on catalog form, when the user choose any of the option, Help Text or Information (i) should pop up or occur.

find_real_file.png

When "Cancel appointment" is highlighted, "To cancel your appointment scheduled for site pick visit on scheduling tool" should show up

When "Change Calendar configuration" is highlighted, "To request changing calendar configuration of the scheduling tool".

Please help me out, how to achieve this.

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Hi Ankur,

 

You can use the g_form.showFieldMsg() that shows up on selection. You need to create an onChange() client script that runs when the field above changes. You can then compare the value & display required message below the field.

Showing it in 'i' option is not possible as it is purpose is to show referenced records & not information.

View solution in original post

3 REPLIES 3

Jaspal Singh
Mega Patron
Mega Patron

Hi Ankur,

 

You can use the g_form.showFieldMsg() that shows up on selection. You need to create an onChange() client script that runs when the field above changes. You can then compare the value & display required message below the field.

Showing it in 'i' option is not possible as it is purpose is to show referenced records & not information.

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if(type_of_request == 1)
{
g_form.showFieldMsg('To cancel your appointment scheduled for site pick visit on scheduling tool.');
}
else if(type_of_request == 2)
{
g_form.showFieldMsg('To request changing calendar configuration of the scheduling tool.');
}
//Type appropriate comment here, and begin script below
}

I made use of above script, but nothing showing up

 

Ankur6
Kilo Contributor

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var val = newValue;
if(val == 1)
{
g_form.showFieldMsg('type_of_request','To cancel your appointment scheduled for site pick visit on scheduling tool.','info','true');
}
else if(val == 2)
{
g_form.showFieldMsg('type_of_request','To request changing calendar configuration of the scheduling tool.','info','true');
}
//Type appropriate comment here, and begin script below

}

 

Working fine.