WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] Possible to add tables to form? (5 posts)

  1. nathanmeffert
    Member
    Posted 1 year ago #

    Can I add tables to my form, or otherwise control the layout of the various elements?

    I'd like my form to look like this:

    First name: [ ] Last name: [ ]

    Not like this:

    First name: [ ]

    Last name: [ ]

    Thanks in advance for any suggestions!

    http://wordpress.org/extend/plugins/contact-form-7/

  2. davejampole
    Member
    Posted 1 year ago #

    I have this code on one of my CF7 forms:

    <div class="onerow">
    <div><label>City
    [text* City 27/ class:text class:City] </label></div>
    <div><label>St.
    [text* State 2/ class:text class:State]</label></div>
    <div><label>ZIP
    [text* Zip 12/12 class:text class:Zip]</label></div>
    </div>

    This puts the city, state and zipcode labels and their input fields all on one line. You can tweek this for your purposes.

    Hope this helps.

  3. nathanmeffert
    Member
    Posted 1 year ago #

    Awesom, @davejampole. Thanks.

    Weird thing is that I cut and you code directly into my form and the labels and fields all still appear on separate lines. I created a test page to show you what I mean:

    http://www.stoicdigital.com/?page_id=443

    Thanks again for your help!

  4. davejampole
    Member
    Posted 1 year ago #

    Check and see if the form has enough width to handle all three fields on the same line. Or, try shortening the size of each field and see if that works. The width of the three fields might exceed the available with of the form.

    Or create a test form with only the code I sent and see how that looks.

  5. nathanmeffert
    Member
    Posted 1 year ago #

    I also realized that I could simply put fields on the same line if the container was wide enough. Thanks for your help, @davejampole!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic