Diable save/submit button on incident form and Alert if it is clicked

Rahul Singh3
Tera Contributor

I have a requirement that Save and Submit button will be disable untill a checkbox is checked and if Save/Submit are clicked while disabled then a alert should be shown stating "Please check the checkbox".

 

How can I implement this.

 

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Rahul Singh3 

Why not make that checkbox as mandatory on form?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

It is client requirement. We suggested but they are migrating from some JS application so want this functionality only.

You could create an onsubmit Client script, which checks if the checkbox is checked. If not, return false, which stops submission of the form.


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.