Align multiple files via unique name

  • Profile Image
    thetechman
    Asked on January 16, 2018 at 08:34 AM

    Hi,

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

    Thanks

  • Profile Image
    Mike_G
    Answered on January 16, 2018 at 09: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.

  • Profile Image
    thetechman
    Answered 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.

  • Profile Image
    thetechman
    Answered on January 16, 2018 at 10:24 AM

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


  • Profile Image
    Marvih
    Answered 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;

    }


  • Profile Image
    thetechman
    Answered on January 16, 2018 at 11:49 AM

    Thanks Marvih.

  • Profile Image
    thetechman
    Answered 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?

  • Profile Image
    Marvih
    Answered on January 16, 2018 at 12:33 PM

    Kindly try this code.

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

    text-align:right !important; 

  • Profile Image
    thetechman
    Answered on January 16, 2018 at 02:10 PM

    This code did the trick. Thank you.

  • Profile Image
    Marvih
    Answered on January 16, 2018 at 02:26 PM

    No worries, glad to be of help.