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

Question

Question

Not able to submit form because of the Required Fields in hidden Pages

asked on June 7, 2019

I have Page breaks on a form and based on a Radio button in the first page it will display and hide the pages. It works well with Javascript, but it does not allow me to submit the form when I am hiding the pages because of the required fields in the hidden pages.
I cannot do this using Field Rules, tried to use the following code but that's also not working

if ($(this).is(':hidden')) {
   $('.req input').each(function() {

    
    //$(this).removeAttr('required');
    $(this).prop('required', false)
    
    });
     
   }

0 0

Answers

APPROVED ANSWER
replied on December 5, 2019

This has been fixed with Forms 10.4.2 with bug 178750 and the package of Laserfiche 10.4.2 will be available for download on the support site this month. 

1 0
SELECTED ANSWER
replied on June 7, 2019

Yes, I was about to post this. That’s what I did. Hide all sections in all the pages instead of pages as such. Hiding pages will not ignore Required fields.

0 0

Replies

replied on June 21, 2019 Show version history

I also can reproduce such issue that will get backend validate error when submit a form with two pages if each page has section and page with required fields is hidden by field rule.

I have filed a bug for this issue and Forms team will fix it in Forms 10.4.2 release.

Currently, i suggest the customer to change Validation level to "No validation" for form settings , then the form can be submitted successfully.

1 0
replied on December 4, 2019

Thank you team. Is there any word on whether this has been officially resolved? 

I'm certainly looking forward to an update which fixes this very time consuming  bug/behaviour. We're still on 10.4.0.1256 but this would be the excuse we're looking for to migrate to 10.4.2.

0 0
APPROVED ANSWER
replied on December 5, 2019

This has been fixed with Forms 10.4.2 with bug 178750 and the package of Laserfiche 10.4.2 will be available for download on the support site this month. 

1 0
replied on December 8, 2019

Thanks @████████!

0 0
replied on March 16, 2020

Will this newer version also ensure I can Hide a Required field w/ Field Rules with "Save data while hidden" enabled?

My current issue things work great if a required field is hidden and ignoring data while hidden, but I get validation errors if I make them save the data while hidden, even if they are empty.

Laserfiche Forms Professional Version 10.4.1.172

0 0
replied on March 17, 2020

If the field rule optipn is "save data while hidden", the hidden field will be validated in the backend based on its settings, so you will get error when the field is empty. If you don't want it to be validated and also save the data when it is hidden, you can change the backend validation level from Form Settings to "no validation".

0 0
replied on June 7, 2019

If you use field rules, make sure to "Hide the field and IGNORE the data". That way the form won't care if the hidden required field has a value in it or not. 

If you use JS to hide the field, you won't be able to submit the form if that field is required. If you use field rules, the form knows it is hidden and will not require it. If you use JS to hide the field, the form doesn't know it's hidden and still requires there to be data in the field to submit. If you wanted to go the JS route, you'd have to use JS to both hide the field and make it required. 

0 0
replied on June 7, 2019

Thank you for the quick feedback!

But hiding the page and choosing Ignore data was not working. When you submit the form it throws the error for the required values. That was why I went for the Javascript option

0 0
replied on June 7, 2019

Can you try hiding the field explicitly as opposed to the page it is on? I believe what you are saying you tried should work, we can investigate it further. 

0 0
replied on June 7, 2019

The form was too long and that was why the Page Breaks were used. There are about 25 Required Fields, so explicitly hiding them will be too tedious.

0 0
replied on June 7, 2019

I am also experiencing the same issue with receiving an server-side aggregate validation error on submitting a form with required fields on a hidden page (the client side validation appears to have correctly ignored the fields), which looks like a bug.

On the hidden page, I had a radio selection conditionally showing/hiding sections on the page based on the selected option.  I did notice that I was only receiving validation errors for the section on the page that would be visible if the page itself was visible.

Based on this I was able to work around the issue by tweaking the field rules to only show the sections on the affected page when the it is visible.  Depending on your form, that might not be viable, but it may be worth adding section(s) if not already present on the affected pages, marking the section header(s) as not visible (if newly added), and then hiding the section as required in the field rules.  That might at least save you from showing/hiding individual fields.

We're on Forms Pro 10.4.0.1256.

0 0
replied on June 11, 2019

We are not able to reproduce based on the description, can you please take a video with screen tool such as Jing(https://www.techsmith.com/jing-tool.html) to illustrate the issue?

0 0
replied on June 13, 2019

I am attaching a word document with screenshots for your reference so that you can troubleshoot further.

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

Sign in to reply to this post.