Is it possible to highlight (red) for check box by Client Script (onSubmit)?

Akkapolk
Giga Expert

find_real_file.png

function onSubmit() {
	// SetRedBox(cab_required)
}

 

Expectation:

find_real_file.png

1 ACCEPTED SOLUTION

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 . 

 

find_real_file.png

 

 

solution is , you can either create here custom field with the choice value "yes" or "no".

 

Cab Required - yes 

                       No

 

 

 

 

View solution in original post

19 REPLIES 19

Harsh Vardhan
Giga Patron

have you used g_form.setMandatory('field name',true);

I already tested as picture below.

find_real_file.png

try this way. open your check box type variable and checked selection required as true. 

 

find_real_file.png

 

find_real_file.png

 

 

I just want to highlight (red) for check box, if it's checked when clicking submit button.

No Mandatory and no required.

 

function onSubmit() {
	.
	.
	.
	if (cab_required === 'true') {
		g_form.addErrorMessage('Unable to close the Change request as there are ' + g_form.getLabelOf('cab_required'));
		// SetRedBox(cab_required)
	}
	.
	.
	.
}