Can we make yes/No type variable name Bold

Ajaychethi
Kilo Explorer
  • Can we make Yes/no type variable bold .Can any one help me with this.

Aditya_hublikar
Giga Sage

 Hello @Ajaychethi ,

 You can acheive this using catalog client script : onload 

 

function onLoad() {
 var element = g_form.getControl('bold_test');
// to set value bold 
    if (element) {
       
        element.style.fontWeight = 'bold';
    }
 
// to set label bold
    if (element) {
    var label = element.closest('.form-group').querySelector('label');

    if (label) {
        label.style.fontWeight = 'bold';
    }
}
}
Aditya_hublikar_0-1794559697387.png

Aditya_hublikar_1-1794559724503.png

 

 

If this helps you then mark it as helpful and accept as solution .

Regards,

Aditya

Ajaychethi
Kilo Explorer

Variable Label should become bold as i selected YES/NO type

 

Hello @Ajaychethi ,

 Means you have to set label bold on selection of particular value from selectbox ?

You can try onchange catalog client script :

function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {
        return;
    }
    var element = g_form.getControl('bold_test')
    if (element) {
        var label = element.closest('.form-group').querySelector('label');
        if (newValue == 'Yes') {


            if (label) {
                label.style.fontWeight = 'bold';
            }
        } else {
            if (label) {
                label.style.fontWeight = '400';
            }
        }
        //Type appropriate comment here, and begin script below

    }
}
 
Aditya_hublikar_0-1794569145662.png

 

If this helps you then mark it as helpful and accept as solution .

yashkamde
Giga Sage

Hello @Ajaychethi ,

 

As per your requirement, created Custom type Variable and added UI Macro into that..

Screenshot 2026-11-13 161645.pngScreenshot 2026-11-13 161701.png

Before Check :

Screenshot 2026-11-13 161146.png


After Checked :

Screenshot 2026-11-13 161156.png

 

UI Macro script :

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">

    <input type="checkbox"
           name="${jvar_name}"
           id="${jvar_name}"
           onchange="
               g_form.setValue('${jvar_name}', this.checked ? 'true' : 'false');
               document.getElementById('${jvar_name}_label').style.fontWeight =
               this.checked ? 'bold' : 'normal';
           " />

    <label id="${jvar_name}_label" for="${jvar_name}">
        Bold Variable
    </label>

</j:jelly>

 

If my response helped mark as helpful and accept the solution.