is it possible to collapse a form iframe

  • Profile Image
    virtualearth
    Asked on November 03, 2011 at 10:33 PM

    Hi,

    Our forms have a number of variables which when checked or selected reveal more information required to complete the form.

    If the user does not check a variable then the form can be quite short however to allow for the variables we have to have a very deep iframe (or allow scrolling) which pushes our footer way down and out of sight to the user.

    Go to http://www.cityclinic.com.au/resources/referral

    Depending on the type of referral and answers to some questions this form could end up 3040px deep.

    example check 'DXA - Bone Density in Reason for Referra'l (about halfway down the form).

    Most of our forms have a range of variables which have a similar impact.

    Is there some way we can keep the iframe nice and tight and only expand as required?

    Kind regards

    Brad

  • Profile Image
    paoloumali
    Answered on November 03, 2011 at 11:50 PM

    Hi,

    Please try embedding your iframe as below:

    <iframe allowtransparency="true" src="https://secure.jotform.com/form/12923143863" frameborder="0" style="width:100%; height:3645px; border:none;" scrolling="no"></iframe>

    Then apply particular css style for the container, something like below:

    div.m.clearfix {

    height:400px;overflow:scroll;

    }

    You should be left with a box displaying at the height specified for div.m.clearfix with a scrollbar.

    Then if you want to change how the scrollbar shows, please take a look at this implementation I found online if it will work for you.