What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Is is possible to make the iframe window height taller when a conditional question shows more fields?Asked by LearnerPark on August 26, 2015 at 01:04 PM
We have a form with several questions with conditional answers that show additional fields when the condition is met. However, when the extra fields show and the form get's longer, the bottom gets cut off because it goes below the fixed height of the iframe window. We could make the extra fields all show by default and then Hide them conditionally, but we'd rather have the form shorter by default. How can we do that?
height more fields shows Make
I have tested your embedded form and I was not able to reproduce mentioned issue that the bottom of the form is cut off. Did you already increase height inside of iFrame code?
What you can do is to set scrolling to auto inside of your iFrame code to see if that will resolve your issue.
<iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://secure.jotform.us/form/32808738803158" frameborder="0" style="width: 100%; height: 1616px; border: none;" scrolling="auto"></iframe>
Hope this will help. Let us know if you need further assistance.
Thanks for your reply.
What I did was set the fields to show by default, or hide if the condition was met which made the form longer to begin with. Evidently looking at the embed code that jotform provides, it sets the height of the window dynamically when it renders the iframe to show the form on the page, but then does not adjust as conditions are met to show additional fields. This would then require the scroll function as you indicated. The biggest problem I'm having now is to get the default answer to show as I've selected in Properties, Selected (default selected answer). It just keeps defaulting to 'no'. I need it to default to 'yes'. Any idea why?
Seems to be showing now as needed. Thanks for your help!