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.

Product fields css classes

  1. Nowton
    Member

    We are currently developing an order form, and would like to float some elements to have them line up. Unfortunately the classes being assigned by the product are not simply a class. They get id's appended, separated by underscores. This makes styling a nightmare, as we have to do this on what is basically an id-level. Is there anyway to solve this? Thanks in advance!

    Posted 12 years ago on Tuesday March 27, 2012 | Permalink
  2. This should help you out:

    http://www.gravityhelp.com/documentation/page/CSS_Ready_Classes

    Posted 12 years ago on Tuesday March 27, 2012 | Permalink
  3. The id's were hard at first but the nomenclature is pretty straight forward. The class name in a form is the id number of the form then the id number of the form field. So if you see field_7_10 as a class the 7 is the form id (which is visible in the form list) and the 10 is the field id (which is visible in the 'edit form section' for each field

    You can also specify you own css class to make life a bit easier. Just go to the advanced section of the field and enter your own custom css class name.

    You can also use firebug to spot the default class names. Once the form field is generated the class name is stuck (unless you changed it yourself) and is not generated new each time.

    Posted 12 years ago on Tuesday March 27, 2012 | Permalink
  4. Nowton
    Member

    Rob thanks, that looks promising. Shonari, thanks for your help. It still strikes me as odd that it does not add a generic class (.price for instance) but applies .price_7_9 instead. Adding custom classes works, but IMO is a bit patchy.

    Posted 12 years ago on Tuesday March 27, 2012 | Permalink
  5. .price_7_9 gives more control as it lets you modify individual fields by default. But if you want to add the same class for all fields just go to the advanced section and apply 'price' for all the css classes then you can make bulk changes. You can then proceed to specify css for specific sections of the field.

    Posted 12 years ago on Tuesday March 27, 2012 | Permalink