Conditions to hide fields are not executed when return to form after submitting

  • Deralict
    Asked on January 11, 2015 at 3:03 AM

    I have some fields which are conditionally set to be hidden or shown depending on the value in other fields. After the form is submitted, a link on the thank-you page links to the original page with the form (for the user to fill out the form again).

    When the form is first visited, everything works as it should (with the exception of the other issues I currently have detailed in other threads). That is, some fields are hidden until the user changes the value in some fields.

    However, when the form is re-visited with the link on the thank-you page, after it has loaded, the fields that should be hidden are not (as if the conditions have not executed).

  • jonathan
    Replied on January 11, 2015 at 8:43 AM

    Hi,

    Can you please try also re-embedding your jotform using its iframe embed code instead.

    User guide: http://www.jotform.com/help/148-Getting-the-Form-iFrame-Cod

    script conflict could be causing the issue.

     

    Conditions to hide fields are not executed when return to form after submitting Image 1 Screenshot 20

    Hope this help. Let us know if you need further assistance.

    Thanks.

  • abajan Jotform Support
    Replied on January 11, 2015 at 9:15 AM

    @Deralict

    I too would recommend replacing the default JotForm code with its iFrame equivalent because just clicking the submit button allowed me to submit a totally blank jotform without any error flags being displayed. This happened on my initial visit to your web page, not upon returning via the "Start Again" button. Moreover, the form took rather long to load. Conversely, it loaded quickly and worked correctly at its own URL:

    http://form.jotform.ca/form/43351436352248

  • Deralict
    Replied on January 11, 2015 at 2:26 PM

    OK, I used the iFrame method instead and that resolved the issue. A side effect of using this method however is that it made the page extraordinarily long (about 5700px!) so the code you have to calculate iframe height is not working well. I managed to find my own code that does work, so I have it working now. Thanks.

  • jonathan
    Replied on January 11, 2015 at 3:35 PM

    Hi,

    Thank you for taking the time to update us on the current status.

    We're glad to know you had manage to figure out a working solution.

    Please don't hesitate to contact us again anytime for any assistance you need with JotForm.

    Thanks.

  • Deralict
    Replied on January 11, 2015 at 4:18 PM

    Oops,

    I spoke to soon. My code is rubbish (only works in desktop environment). So I'm going to do it the officially sanctioned way and use the code you supply.

    So I've re-implemented you code, and the problem now is that the iframe height is way too big.

  • jonathan
    Replied on January 11, 2015 at 5:01 PM

    I can see this issue on the website

    It is weird because when I checked it earlier it was fine and there was no huge space below the page.. but it has now.

    Conditions to hide fields are not executed when return to form after submitting Image 1 Screenshot 30

     

    The script part of the iframe embed was suppose to auto fix the height of the iframe embed on a page, but it seems to be not taking effect.

    Conditions to hide fields are not executed when return to form after submitting Image 2 Screenshot 41

     

    anyway, since this is a different issue than the original topic, we will find solution to this on another thread here http://www.jotform.com/answers/494181

    We will update you.

    Thanks.