- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2024 12:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2024 12:36 AM
Hi @MaidhiliL ,
Try the below in onLoad Client script:
function onLoad() {
g_form.setMandatory('choiceFieldName', true);
}
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2024 12:36 AM
Hi @MaidhiliL ,
Try the below in onLoad Client script:
function onLoad() {
g_form.setMandatory('choiceFieldName', true);
}
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2024 12:42 AM
Hi @MaidhiliL
client script to make a choice field mandatory:
For `onLoad` Client Script:
function onLoad() {
g_form.setMandatory('your_choice_field', true);
}
For `onChange` Client Script:
function onChange(control, oldValue, newValue) {
if (newValue === 'some_value') { // Adjust condition as needed
g_form.setMandatory('your_choice_field', true);
} else {
g_form.setMandatory('your_choice_field', false);
}
}
———————————————-
Please consider marking my reply as Helpful👍 and/or Accept Solution☑️, if applicable. Thanks!
Replace `'your_choice_field'` with the actual field name and adjust the condition as needed.