WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Open div tags get auto-closed?

[Resolved] Open div tags get auto-closed?

  • Hello,

    I wanted to create my own custom two-column layout for a FSCF form. My method was to put a <div id="column1"> in the Welcome Introduction, and put </div> after one of the later form fields. Then I wanted to insert <div id="column2"> and once again close this div after the last form field.

    Unfortunately, when I insert any kind of an open div before or after a field, FSCF or WordPress automatically closes it with </div>, which makes my plans of a custom two column solution impossible.

    Is there any way to stop the auto-closing of open divs?

    Thank you very much in advance.

    https://wordpress.org/plugins/si-contact-form/

Viewing 8 replies - 1 through 8 (of 8 total)
  • alexcowles
    Member

    @alexcowles

    Having the same problem here – did you find a solution?

    figure8
    Member

    @figure8

    Trying to remember, but don’t think I found a solution. I think I ended up using a one-column form.

    If you want a simple approximation of two columns, you can check the option to make one form field follow another, but of course it’s not the same as having two separate divs.

    Our best bet is to reach out to the plugin’s author, Mike Challis, to find out where/why the auto-close occurs. Can you help us out, Mike?

    Plugin Author Mike Challis
    Participant

    @mikechallis

    This plugin will not auto-close divs, but your theme, WordPress itself, or other plugins might be doing that

    See this help page to make a two column form

    How to make a two column form

    alexcowles
    Member

    @alexcowles

    I’m struggling to believe that anything else is auto-closing those divs. Very odd. I wouldn’t even know how to go about finding that out either. I don’t have any other plugins running that would in theory do that, and I don’t think just having jQuery on the page will do that by default, not without me telling it to.

    Very odd.

    alexcowles
    Member

    @alexcowles

    Also – I really don’t want to use tables to make a two column form – it’s not semantic, since this isn’t tabular data.

    Plugin Author Mike Challis
    Participant

    @mikechallis

    Well I wrote the code in this plugin, so I would be the one to tell you that there is no logic in this plugin that auto-closes any divs.

    Make sure the form shortcode is not surrounded by p tags, or you can have some unexpected results.

    I did say that your theme, WordPress itself, or other plugins might be doing that.

    Although you should rule out the theme, or other plugins first, it might be the WordPress autop feature that causes divs to auto-close.

    Here is an option for two colum layout that does not use tables.

    Fast Secure Contact Form Two Columns Layout

    Plugin Author Mike Challis
    Participant

    @mikechallis

    Related help page on troubleshooting unwanted html in your form output

    Why is there extra space or gaps on my form?

    figure8
    Member

    @figure8

    Thanks for your replies, Mike — greatly appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] Open div tags get auto-closed?’ is closed to new replies.