- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2019 11:07 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2019 01:33 AM
ok i got it.
it's true/false type field , it always contains a true or false value so it will always be considered to be filled that's why its showing you as grayed astric mark
for reference. you can inspect on that field and check the value , you will see it has "false" value .
solution is , you can either create here custom field with the choice value "yes" or "no".
Cab Required - yes
No

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2019 12:26 AM
the function is g_form.setMandatory('field name',true);
function onSubmit() {
.
.
.
if (g_form.getValue('cab_required') === 'true') {
g_form.addErrorMessage('Unable to close the Change request as there are ' + g_form.getLabelOf('cab_required'));
g_form.setMandatory('cab_required',true)
}
.
.
.
}
by the way do you think it really make sense to checked the check box and marking it as mandatory ?
whats your exact business need here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2019 12:46 AM
As I reply.
I just want to highlight (red) for check box, if it's checked when clicking submit button.
No Mandatory and no required.
However, it's OK, if set Mandatory and then it can highlight (red) for check box. But it's not highlight.
Please check my test (cut some code for test) as follows:
Client Script (onSubmit):
Create Change Request:
Checked CAB required and then Click Request Approval:
It show the error message on top of form, set Mandatory but not highlight (red).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2019 12:56 AM
reason being , you have already selected the true , that's why it can not show as mandatory ( red ).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2019 01:16 AM
Could you help to test, please?
We can't highlight (red) for check box by set Mandatory.
Please check my test as follows:
Client Script (onLoad):
function onLoad() {
g_form.setMandatory('cab_required', true);
g_form.setMandatory('cab_recommendation', true);
}
Create Change Request and then click Request Approval.
I don't select the true for check box.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2019 01:33 AM
ok i got it.
it's true/false type field , it always contains a true or false value so it will always be considered to be filled that's why its showing you as grayed astric mark
for reference. you can inspect on that field and check the value , you will see it has "false" value .
solution is , you can either create here custom field with the choice value "yes" or "no".
Cab Required - yes
No