What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How to change the CSS Style of one sub-label with no id? - RESOLVED

    Asked by AA_C on December 28, 2016 at 10:12 AM

    Hi,

    How do I in inject css code to stylize one of my forms sub labels; form 60965567853976

    There is no id for the sub-label;

    Here is the

    code line:

     

     

    class="form-line form-line-column form-col-2 jf-required" data-type="control_textbox" id="id_27">
     class="form-label form-label-top" id="label_27" for="input_27">  
     Dog's AAC ID number   class="form-required">   *      
     
    id
    ="cid_27" class="form-input-wide jf-required">   class="form-sub-label-container" style="vertical-align: top;">
     
     type="text" class=" form-textbox validate[required, Numeric]" data-type="input-textbox" id="input_27" name="q27_dogsAac" size="4" value="" maxlength="4" />  
     class="form-sub-label" for="input_27" style="min-height: 13px;"> REQUIRED - - - - REQUIRED  
           

    I want the line REQUIRED - - - - REQUIRED to be color:#dd0055

    I tried using;

    #input_27 { color:#dd0055; } Made the inputted text red

    #cid_27 { color:#dd0055; } Didn't work

    .form-sub-label { color:#dd0055 !important; } Made all the sub-labels red.

    How do I do this without an id for the sub-label ?

    Thanks,

    Regards
    Robert
    AAC

  • Profile Image
    JotForm Support

    Answered by AIDAN on December 28, 2016 at 10:35 AM

    Hi Robert, thank you for contacting us.

    Please use this custom CSS code to achieve what you're after:

    #input_27 + label.form-sub-label {

        color: #dd0055;

    }

    For completeness, I created a corrected form if you would like to clone ithttps://www.jotform.com/63623957859979

    If you need further assistance please let us know. We'll be happy to help.

  • Profile Image

    Answered by AA_C on December 28, 2016 at 01:13 PM

    Hi,

    I used the supplied code now all is good. Also I just learned something new about applied css.

    Thank you,

    Regards
    Robert
    AAC