Mandatory field when submitting

Hi…
How can I make field mandatory when submitting from not when saving the form.
Thanks

Try to write a custom function, hook on_submit and check fields value

2 Likes

@dufani1 use before_submit instead. If you hook on to on_submit the document will submit itself regardless of whether your validation check passes or fails. You can set validated = false; if the field is empty so that the submission ultimately fails.

2 Likes