- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2022 12:00 PM
Hi,
I have created a widget that I added to a form and added it to the custom label variable type. The widget is a separate form that needs to be filled out. How can I make the widget itself mandatory. I need to make sure they fill it out. I want to makes sure it is filled out before submitting.
I know that I can make the fields on the widget mandatory which they are, but the user can bypass that form altogether and still submit the form, just by not opening it up. So I need to figure out a way to make sure they open the widget.
I tried to do an onSubmit client script with an alert, but once the OK button is selected on the alert, the ticket still continued to submit.
Any help would be appreciated.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2022 01:03 PM
For an onSubmit script you need to do "return false;" to get it to not continue submitting the form. If this is for a Catalog Item you can check the variable to see if it has a value, assuming you are storing the selections on the widget there.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2022 01:03 PM
For an onSubmit script you need to do "return false;" to get it to not continue submitting the form. If this is for a Catalog Item you can check the variable to see if it has a value, assuming you are storing the selections on the widget there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2022 04:24 PM
Thank you, Drew!
It worked!!!! I really appreciate the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 10:51 AM
@Dazler Hello Dazler,
Could you please help with script you used to set it as mandatory.
Thanks in Advance!
Regards,
Kruthika