You are viewing limited content. For full access, please sign in.

Question

Question

Adjusting Calendar Required Fields In Form Submission!

asked on September 13, 2017

My next question for today... considerably more important than my last!

 

I have a Form that adjusts itself on the fly. It's for employee time tracking. So basically, if you're a Parks employee, you have a different week ending date and table to fill out then you would if you were a Finance employee. I have that all working great - the Form auto-updates itself on the fly with hidden or shown fields depending on which user has authenticated them-self in the Form.

But it does create a problem... I can't use required fields. If I do, it will not allow Form Submission. 


Example: I authenticate myself in the Form, page 1, as a Parks employee. Even though I have Calendar 1 set to Required in the Form, it will NOT show up on that Parks employee's page, because he needs to use Calendar 2. So, Calendar 2 correctly shows up. He fills it out, the rest of the Form, hits submit, and gets this error message (below) stating that the required field, Calendar 1, was not filled out. Of course, Calendar 1 IS a required field... just not for him. It's required for other users, and Calendar 2 is required for him.

The only way I can think to fix this is if JavaScript updated which Calendar was required on the fly. You authenticate, Forms displays the correct Calendar, JavaScript makes one calendar not required, and the other required.

 

Can this be accomplished? I'm happy to provide any additional insight into my Form, error messages, etc.

 

 

Calendar Required Error.PNG
0 0

Replies

replied on September 20, 2017

Thanks for the help guys - I actually found a very simple, very quick way to fix this. It's a bit confusing but super useful to know for future issues like this.

Basically... on the Field rules section... if I select to "Hide" instead of "Show" a Calendar, and "Ignore Field Values" vs. "Save"... it works like a charm.

Example -

1) If Calendar A and Calendar B are both required fields.

2) User is a Parks employee, and needs Calendar B.

3) If it's set to "Show" Calendar B upon authenticating that user, and "Save Values"... it will error on Form submission. Because Required Calendar A (which doesn't display) wasn't filled out.

4) However... if I instead change the logic to "Hide" Calendar A upon authenticating that user, and "Ignore Values"... zero error on Form submission. Works like a charm, while still making Calendar B required.

1 0
replied on September 20, 2017

Hi Ryan,

Glad you got it working.

Just to provide some background on this, if you do ever need to save the value even when hidden, what happens is that if you choose "Save" the backend validation will check the field even when hidden and potentially generate the error.

With backend validation off, it will still validate on the user side, but it will ignore anything hidden and won't choke on hidden values regardless of whether they are set to Save or Ignore.

1 0
replied on September 13, 2017

One way to do it would be to have a radio button that asks what type of employee you are (Parks employee, etc.)

Then if you click on the "Parks employee" radio button, hide Calendar 1 with Field Rules.

Or not show any calendar at the beginning and just show the one that needs to be filled out, depending on the radio button click.

0 0
replied on September 13, 2017 Show version history

Try disabling "back-end" validation as I had issues with that for hidden required fields as well. Also see if your hidden fields are set to save or ignore data when hidden.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.