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.

Swapping Label and Inputs

  1. Hi Guys,

    The folks I'm helping out are don't like how gfield labels are above, but ginput labels are below (example being: names, and address labels). Since things should be consistent, I'm just hoping to go in and swap the order for inputs and labels -- if you could tell me which file to look in, that would be very helpful, since there are many instances of "label for="fieldID".

    Many thanks,

    -m

    Posted 12 years ago on Tuesday August 14, 2012 | Permalink
  2. You won't want to edit the core plugin files, because your changes will just get overwritten when someone does an update of the plugin.

    However, at the moment there is no hook or filter available for this so you'd have to resort to using some crafty CSS or jQuery to prepend the sublabels (which is what I would recommend doing).

    Posted 12 years ago on Tuesday August 14, 2012 | Permalink
  3. editing the core files is exactly what I want to do -

    I did try putting in JLabel.js (http://www.wduffy.co.uk/jLabel/) but it ran roughshod over the form -- moving labels seemingly at random.

    Since I plan to update infrequently, and it's one switch on one file, editing the core seems by far the most efficient way to reposition the labels -- I'm just hoping you can tell me where I'll find the input/label code for addresses and names.

    Thanks,

    -m

    Posted 12 years ago on Tuesday August 14, 2012 | Permalink
  4. To Clarify -- http://martinconnelly.com/issue.png -- this is the problem -- the fact that it looks like Address (in bold) is the label for the first field.

    Posted 12 years ago on Tuesday August 14, 2012 | Permalink
  5. What if the sublabels were much closer to the inputs so it was more obvious what goes with what? By default, our sublabels are not that far away from the associated input. Do you have a link to your form?

    Also, jlabel is mainly used to place labels inside of inputs. I was talking more about something like this:

    http://www.gravityhelp.com/forums/topic/change-position-of-sub-labels-on-advanced-fields#post-48538

    Posted 12 years ago on Tuesday August 14, 2012 | Permalink
  6. That worked perfectly.

    Thank you so much!

    -m

    Posted 12 years ago on Tuesday August 14, 2012 | Permalink
  7. Right on, glad to help.

    Posted 12 years ago on Tuesday August 14, 2012 | Permalink

This topic has been resolved and has been closed to new replies.