I'm going to use tabs to split my long form up, using formatting rules to hide the panel for the non-current tab. I also have required fields on each panel/tab, so I expect to be unable to use SharePoint's column setting for whether or not the field is required. This is because I want to allow the user to "save and continue". I expect clicking "save and continue" won't work if there is a SharePoint required field on a later (non-visible tab).
That means I'll have to use validation to require the field.
Finally, I also have a follow up text field on a panel, for each regular text field. That panel is hidden, until the user checks a checkbox indications they want to provide follow up text. This is done through rules on the panel with the follow up text field. So I have about 5 panels with most fields, and on each panel, are several nested panels for the hidden follow up text fields.
My question is how to order my rules, so that they all work properly. My guess is that I should use:
1. Rules to hide/show sub-panels with follow up fields for the first panel
2. Rule for the first tab/panel validation events, on clicking "save and continue" button event
3. Rule to hide/show next panel
... and so on for each...
*Add do I need something in between 2 and 3, to facilitate the saving/posting of data to SharePoint list, or will the button do that for me? (But can the validation rule run on the click event and prevent saving unless the validation passes?
I figure I can put a "Save All and Submit" button outside of the rule-hidden panels... Any issues with that?
Solved! Go to Solution.
It apparently doesn't matter. The validation rules only run on the save and submit (if you leave the default). Now, my problem is that all validation errors are on one block (nf-validation-summary). I've managed to manipulate the div a little, but can't help users find the tabs/pages with the validation errors, other than spelling them out on the custom message.
I was able to make the validation summary center on the page fixed (users don't see it, if they are scrolled down). I also got it to close on clock, but it's still not an ideal UX.