How to add a red asterisk to a label variable on CI

gunishi
Tera Guru

Hi there, 

 

I have a requirement where I want to add a red asterisk to a label variable on a CI form to indicate that one of the checkboxes underneath it must be selected. 

 

I currently have this script from SNC guru that I am trying to implement but it is not working. 

 

function onLoad(){

try{

mandatoryLabelName = 'choice_of_sauce';

$('status.' + g_form.getControl(mandatoryLabelName).id).show();

}catch(e){}

}

 

Any help would be appreciated. 

 

Kind regards,

G

1 ACCEPTED SOLUTION

If these are variables on a Catalog Item, first add the label, choose no other setting.

Then add your checkboxes with an order to where they appear following each other right under the label variable.

In the first checkbox that appears after the label, check the "selection required" / "mandatory" box in the top-right corner of the variable settings.  It will look like this:

BradBowman_0-1696942360472.png

BradBowman_1-1696942360422.png

 

 

View solution in original post

5 REPLIES 5

You are welcome!