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.

Formatting input field

  1. Hi, sorry if I overlooked the obvious, but this is because I just started using Gravity, and in fact did succesfully design a few forms. However css, php and what goes where is largely still a mystery to me.
    I need hellp in how to:
    1. Change the (width) lenght
    2. Change the input mask
    3. Change the fontcolour
    Of input fields.
    Taking the standard address field I would like to limit the size of the zip field to 7 spaces and force the user to enter it in the following format '9999 AA'.
    I realise that the address field is an complex field, but my question goes for all types of inputfileds.
    I've searched all over the forum and documentation in Gravity, but could not find a step-by-step guide for dummies like myself.
    And, by the way, why aren't these standard layout parameters settable in the field definition window?

    Posted 12 years ago on Monday April 30, 2012 | Permalink
  2. As far as the styling goes, have you seen these documentation areas already?

    http://www.gravityhelp.com/documentation/page/Design_and_Layout
    http://www.gravityhelp.com/frequently-asked-questions/faq-styling-formatting/
    http://www.gravityhelp.com/other-resources/ - Down towards the middle/bottom are general CSS rules and information

    As far as the input mask goes, not every field has that function built-in. Your best bet is to use the Single Text Input field which does allow for it - you'll just need to recreate your address field into separate fields.

    If you get stuck, post a link to your form and point out specific pieces in the styling and we can help pinpoint it more specifically with you.

    Posted 12 years ago on Monday April 30, 2012 | Permalink
  3. Thank for your fast reply. I've reader through the first two links, but could'nt find the Right anders. Eg. The examples often don't explain wereld the code has to ben put (in which file). Anyvway, please have aan look at http://www.notu-leren.nl
    You first have tot select aan radiobutton and continue tot the seconden form. The zip field (postcode) in the address section should be formatted 9999 AA.
    the town field (stad) is misalingned. The date-of-birth field is wider than the input mask (dd/mm/yyyy). Als, I'd like to change the colour of the price field from red tot Black.

    Posted 12 years ago on Monday April 30, 2012 | Permalink
  4. To set the width of the DOB field you can use this in your theme's stylesheet:

    [css]
    #input_2_20 {
    width: 7%;
    }

    For the Price color you can use this:

    [css]
    .gform_wrapper span.ginput_product_price {
    color: black !important;
    }

    Something from your theme or a plugin is injecting break tags in your address field which is causing the misalignment: screenshot

    That could be moot if you decide to make your own address field to accomodate your input mask as I described above.

    Posted 12 years ago on Monday April 30, 2012 | Permalink