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.

Option to display field descriptions above field

  1. Anonymous
    Unregistered

    I'm wondering if you could add an option to display the description about the field, both on a single field and globally for a form?

    Where I need right now is for a large number of checkboxes; the description is "below the fold" and I fear people will never see it.

    Posted 14 years ago on Monday February 15, 2010 | Permalink
  2. You could use CSS to reposition the description, as described by Kevin here:
    http://forum.gravityhelp.com/topic/how-to-create-single-checkbox-that-is-required-for-confirming-tc-for-example#post-2207

    Posted 14 years ago on Monday February 15, 2010 | Permalink
  3. Here's an alternate method that you can try. It uses jQuery to reposition the description.

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
      <script type="text/javascript">
      $(document).ready(function() {
    
      $('li#field_xx_yy .gfield_description').insertAfter($('li#field_xx_yy .gfield_label'));
    
      });
      </script>

    You'll want to add this to your page template or your header.php file. If you're already calling the jQuery library, you can omit that initial script reference. You'll just need to replace the "#field_xx_yy" with your actual field ID, something like "#field_15_4".

    You can repeat that for each description you would like to relocate. The benefit to doing it this is that there is less CSS manipulation (maybe a few margin/padding tweaks) and that it displays inline so will adjust to fit varying lengths of text rather than having to rely on specifying heights in the CSS.

    view a screenshot

    Posted 14 years ago on Monday February 15, 2010 | Permalink
  4. Anonymous
    Unregistered

    @illinoisharley: Thanks for this. It's a short-term workaround though so I do hope to see a solution that allows the user to configure in the admin console.

    @Kevin Flahaut: The jQuery solution is also awesome, but longer term an admin console solution would be appreciated.

    That said, is there not a way we can optionally have meaningful names for ids, i.e. field_my_options vs. field_2_5? The latter is really hard to maintain and thus fragile.

    Posted 14 years ago on Monday February 15, 2010 | Permalink
  5. We do plan on adding this in a future release. We are always looking at ways to make the plugin better and development will never be "done" as there are always things to add and improve.

    Posted 14 years ago on Tuesday February 16, 2010 | Permalink

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