How do i arrange numerical field values so they are right-aligned

  • Profile Image
    hilltopkennels
    Asked on July 28, 2015 at 06:25 PM

    I wish to have a summary section on my form where a list of prices can be shown with a total at the bottom. As the data is numeric with 2 decimal places it needs to be right aligned so that different values line up correctly, eg.

     

    £2350.00

    £17.69

    is wrong.

     

    £2350.00

       £17.69

    is almost right (had to use spaces to make it look almost lined up)

  • Profile Image
    jonathan
    Answered on July 28, 2015 at 09:27 PM

    You can add CSS code to target the specific numeric field to set the text-align style to right

     

    user guide: http://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes

    Example:

    #input_1,#input_3,#input_4{

    text-align:right;

    }

    the input id# are the Numeric fields.

    test form: http://form.jotformpro.com/form/52088551826966?

     

    Hope this help. Let us know if you need further assistance.

    Thanks.

     

     

     

  • Profile Image
    hilltopkennels
    Answered on July 29, 2015 at 04:18 AM

    That's great, works a treat, many thanks.

  • Profile Image
    BJoanna
    Answered on July 29, 2015 at 05:16 AM

    On behalf of my colleague, you are welcome.

    Feel free to contact us if you have any other questions.