Align multiple files via unique name

  • thetechman
    Asked on January 16, 2018 at 8:34 AM

    Hi,

    I would like to know if is possible to align multiple files via unique name instead of ID.

    Thanks

  • Mike_G JotForm Support
    Replied on January 16, 2018 at 9:49 AM

    I'm not completely sure I understand your concern but are you asking if it is possible to use the field's {uniqueName} instead of its element id to style it using CSS codes?

    I would like to apologize, but I'm afraid that would not be possible. If you want to style the fields in your form using CSS, then its element id should be used.

    However, if in any case, I have misunderstood your concern, please get back to us and we will be glad to help you further.

  • thetechman
    Replied on January 16, 2018 at 10:04 AM

    Hi Mike_G,

    unfortunately you have not misunderstood.

    The use of unique names would have helped me a lot because I have to right align may fields. The hassle is to check the name of all the fields I have to align.

    Here an example of some of them (they are more than 80) :

    #input_379, #input_380, #input_381, #input_382, #input_383, #input_384, #input_385, #input_386, #input_377, #input_378 {

      text-align: right;

    }

    Any idea on how I can simplify the operation?

    Thanks.

  • thetechman
    Replied on January 16, 2018 at 10:24 AM

    Sorry, I forgot the form URL : https://form.jotformeu.com/73613159595364


  • Marvih
    Replied on January 16, 2018 at 11:36 AM

    Modifying the attribute type of the field might work but I haven't still tested it yet. 

    You can also set all the form textboxes to align right.

    .form-textbox{

    text-align: right !important;

    }


  • thetechman
    Replied on January 16, 2018 at 11:49 AM

    Thanks Marvih.

  • thetechman
    Replied on January 16, 2018 at 12:00 PM

    With the code you provided all textbox fields are right aligned. If I need to right align only form calculation fields, which code is needed?

  • Marvih
    Replied on January 16, 2018 at 12:33 PM

    Kindly try this code.

    li[data-type="control_calculation"] input[type="text"]{

    text-align:right !important; 

  • thetechman
    Replied on January 16, 2018 at 2:10 PM

    This code did the trick. Thank you.

  • Marvih
    Replied on January 16, 2018 at 2:26 PM

    No worries, glad to be of help.