Make a custom label with a widget mandatory

Dazler
Mega Sage

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.

 

1 ACCEPTED SOLUTION

DrewW
Mega Sage
Mega Sage

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.

 

View solution in original post

3 REPLIES 3

DrewW
Mega Sage
Mega Sage

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.

 

Thank you, Drew!

It worked!!!! I really appreciate the help.

Kruthika BM
Tera Contributor

@Dazler Hello Dazler,

Could you please help with script you used to set it as mandatory.

Thanks in Advance!

 

Regards,

Kruthika