I have a button on the form that translates to the "Complete" button when the form is generated in Workspace.
The validation of the form was not working properly and there were some field that would be mandatory based on others. Whether or not they are mandatory depends on if either of two other field was checked off. The idea is that since these two field cannot be required (they and either) that a hidden field would be made mandatory to catch in the preSubmit event. However, we found with testing that this did not always work.
So, I coded behind the submit button to execute a final check in the preSubmit of the button. This same button translates to the complete button when the form runs in Workspace.
However, I came in a few days ago and the complete button is not working and the edits on the hidden fields seem to be working flawlessly. I even coded just an app.alert in the presubmit to see if it was going in there. The message is never displayed.
I have a few questions:
1) What would cause functionality to work then not work.
2) Is the preSubmit of the complete button always executed?
3) What is the best practices around a final validation check?