PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Splitting a form into two columns

  1. eschoolnews
    Member

    I am trying to split a form into two columns. I know with the built in styles you can do the following:
    Q1 | Q2
    Q3 | Q4 ...

    But this has the problem that items have to be of a similar height on the right and left to avoid white space after questions

    I am looking for a way to lay out a form
    Q1 | Q5
    Q2 | Q6
    Q3 | Q7
    Q4

    A sample of what I would like the form to look like in the end (what I am replacing with your product):
    http://www.eclassroomnews.com/wp-login.php?action=register

    Is there a simple simple way to wrap questions in a div?
    <div class="rightside"> 1, 2, 3, 4, 5</div>
    <div class="leftside"> 6, 7, 8</div>

    I know I can use PHP to possibly insert a string into the form, by capturing what gravity is outputting. Lots that could go wrong there... I have looked at the hooks, and found many that they let me alter values or class of a field, but none that would let me insert html before or after a field.

    Posted 9 years ago on Thursday April 19, 2012 | Permalink
  2. David Peralty

    You could use the HTML block field to insert HTML before or after a set of fields which you could then hook into via CSS to do what you are after.

    Posted 9 years ago on Thursday April 19, 2012 | Permalink
  3. eschoolnews
    Member

    BTW. I found http://www.gravityhelp.com/forums/topic/how-to-split-form-into-two-columns-single-line-entries-left-text-area-right before posting this. It is almost what I need, if only I had so few fields. I been working with the info on http://www.gravityhelp.com/css-ready-classes-for-gravity-forms/

    Posted 9 years ago on Thursday April 19, 2012 | Permalink
  4. David Peralty

    Try what I listed above to be able to block them out in larger groups by surrounding them with divs using the HTML block field and let me know if that works for you.

    Posted 9 years ago on Thursday April 19, 2012 | Permalink
  5. eschoolnews
    Member

    Thank you, for the quick reply Found an example (once i used the search terms...)

    http://www.gravityhelp.com/forums/topic/textarea-will-make-extra-space-in-layout#post-52634

    Posted 9 years ago on Thursday April 19, 2012 | Permalink
  6. eschoolnews
    Member

    Worked like a charm. Sometime the easiest solution is staring you right in the HTML block. I will post it once it is in it's final URL for everyone else to see in the future.

    Posted 9 years ago on Thursday April 19, 2012 | Permalink
  7. Yep, if you're a bit creative with the HTML blocks, you can do a lot of nifty stuff. Glad you found that last example and thanks for the update.

    Posted 9 years ago on Thursday April 19, 2012 | Permalink