Expand my Community achievements bar.

Required filed in custom form for hidden field

Avatar

Level 2
I have some complicated custom forms that have different scenarios and we are hiding whole section of the form unless its relevant to the scenario selected. But because we hide them it seems we cannot then make the field required because it won't allow them to submit the form due to the required field that are hidden still for the scenarios they were not trying to submit. Anyone know if there is a workaround for this? Scott Hinchman Automatic Data Processing, Inc.
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

7 Replies

Avatar

Level 10
Hi Scott, You're in a classic Catch-22 Required Parameter trap (with a side-order of Form Logic), so I'd suggest you consider making said fields not required, and instead add some Calculated Custom Data Parameters that report the status of the data, so you can then use the later to locate and resolve exceptions. My entry under "https://community.workfront.com/discussions/community-home/digestviewer/viewthread?MessageKey=526e1c76-2771-489e-a04f-dd69882674ed&CommunityKey=aaafaff0-5e4e-4e38-8903-f1f990935567&tab=digestviewer#bm526e1c76-2771-489e-a04f-dd69882674ed">this post has a remarkably old PowerPoint attached to it that elaborates further. Regards, Doug Doug Den Hoed - AtAppStore Got Skills? Lend a hand! https://community.workfront.com/participate/unanswered-threads

Avatar

Level 2
I think I understand what you mean but I read the PowerPoint and I am not sure what I am puling from that as there is a lot there. This is likely due to my limited experience in using workfront as far as calculations go. When you say Calculated Custom Data parameters is that different than a calculated field? I am using a custom form to accomplish the task and the idea is they should not be able to submit anything unless its 100% correct. Would I use a custom calculated field to say something like IF this scenario is selected and this field is blank then blank "" and make the calculation a required field so if its blank it doesn't work? I am not seeing how that would work because the calculations don't function until after you submit. or is it happening just before the submission, the same action? Scott Hinchman Automatic Data Processing, Inc.

Avatar

Level 10
Hi Scott, No worries; happy to elaborate. Yes, I use the terms Calculated Custom Data Parameters and Calculated Field interchangeably In principal, using Required Fields to prevent submitting the Request until it is 100% is a common, tactile approach In practice, once Form Logic is introduced that (as you discovered) hides any such required fields, the wheels fall off the wagon That can obviously lead to user frustration, and can culminate in entering "Whatever" just to meet the Required aspect (worst case scenario, imho) Presumably, the Form Logic is important, and will help guide users to what they need (and reduce frustration) And so, to avoid the can't-fill-in-what-you-can't-see gotcha, I suggest you remove the Required settings on any such field (at least) To then return to the prevent submitting objective, yes, I am also suggesting you use a Calculated Custom Data Parameter The formula is indeed usually a series of IF statements, likely mirroring the Form Logic, typically resolving to a finite set of obvious states (e.g. "Green", "Yellow", "Red") Because that data is persisted, you can then build Reports that Filter, Group, Sort, and highlight such items accordingly, decreasing the chance of submitting the form prematurely BONUS POINTS: I just thought of this, but with all of the above in place, you could also add a single Required checkbox called "I have reviewed and confirmed the contents and accuracy of this Request", and put it in a special Section with Form Logic on it that ONLY makes that section visible for the user to check when the formula resolves to (for example) "Green"...what an interesting reversal on my earlier assertion. Learning to harness Calculated Custom Data Parameters is one of the most powerful, interesting, frustrating (wait: what?), and fun aspects of Workfront, and I encourage you to fearlessly dive in. There are lots of other folks willing to help in that particular swimmin' hole. Regards, Doug Doug Den Hoed - AtAppStore Got Skills? Lend a hand! https://community.workfront.com/participate/unanswered-threads

Avatar

Level 2
Hi Doug that makes sense and I like your idea at the end as well :) thank you for adding additional clarity I am happy to know I can do something that will solve for the problem. Scott Hinchman Automatic Data Processing, Inc.

Avatar

Level 10
My pleasure Scott, One footnote: Calculated Custom Parameters do not compute until the record is saved to the Workfront Database, so for my BONUS POINTS item above, users would have to first save the Request and then look at it again in order for the Form Logic to realize that "Green" was in play. That might be a good thing -- measure twice, cut once -- but if you're looking for a way to have users submit a request in a single session, the Form Logic itself would have to carry all the same checks and balances that I'm proposing the Calculated Custom Parameter contain, in order for the Form Logic to "know" in real time when the final confirmation section should be revealed. Regards, Doug Doug Den Hoed - AtAppStore Got Skills? Lend a hand! https://community.workfront.com/participate/unanswered-threads

Avatar

Level 10
If you already have to provide different info for each scenario how about using a different form for each of the 2 scenarios so that you can make any fields you want to be required? You can use the exact same fields in each form, just add the hidden fields to form #2 so they aren't hidden? Jill Ackerman

Avatar

Level 2
That would be a great solution but its already a well established form with many users. We would need to retrain them so we are trying to avoid that while also reduce the number of entries with missing data. Scott Hinchman Automatic Data Processing, Inc.