Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Submit buttons will not allow a form to be submitted if there are empty required fields, which poses a problem for out Save button.

...

To get around this we can do the following:

...

2. Add javaScript to the save progress button that sets the value of the checkbox. If you are using a stage button then the code will go in the validateButtonPressed event and look like this:

Code Block
//toggle check that will disable required fields.


if(pActionId === “S_StartToDraft” || pActionId === “S_DraftUpdate”) {


BO.F_ReqFieldFlag.setValue(true);


}

3. Add javaScript to clear the value of the checkbox in the onLoad event (this resets the flag)

...

By using this technique the user will be able to save the form into your custom “draft” stage. Note: You should be able to use 1 rule to set all the required fields based on the value of the checkbox.

...

Attached is a sample form that demonstrates the functionality, click the paper clip at the top of the article to download it.