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

    Could someone quickly show me how to turn specifc questions Red ...

    Asked by csanders_watpac on October 19, 2014 at 08:58 PM

    I'm not proficient with CSS so while I could spend time figuring out where, what and how to inject the necessary code ... I could also just ask ... someone who already knows this stuff !

    :-)

    I have a series of "toggle" questions throughout my survey and they all start with "Show/Hide Question "...

    I want to be able to make just those questions stand out visually such as making them Red instead of Blue like all the rest

    They are all the Radio-button class exactly like the example, so if the code could be done based upon the "Show/Hide Question " string that would be optimal rather than having to get each of the control_ID's ... which I can do if I have to obviously.

    It would just be great to do something like;

    For each ctrl in controls where control.class=radio_button
       If Left(ctrl.Title, 18) = "Show/Hide Question" Then ctrl.title.font.foreground=Red
    Next

    Thanks in anticipation
    Regards colin@techtamed.com

    Page URL:
    http://www.jotform.com//?formID=42892925667875

    Screenshot
    survey style font next
  • Profile Image
    JotForm Support

    Answered by jonathan on October 19, 2014 at 09:52 PM

    Hi,

    I am not really sure that it is possible to affect the style of the elements using Conditional Statement.

    What I am saying is, this sample conditional statement you have

    For each ctrl in controls where control.class=radio_button
       If Left(ctrl.Title, 18) = "Show/Hide Question" Then ctrl.title.font.foreground=Red
    Next

    is not possible as styles are not affected by affected by input since they do not have input value like a an input type element.

    --

    From what I have gathered so far, how about if you just make the input field required/non-required using Conditional Statement. This is very much possible using the form builder.

    There is an option to make a question *Required base on conditions

    OR

    using the long method.. you can create multiple similar questions with different color -- blue or red.

    Then just use the Show/Hide conditional statement base on the selected option (of Radio option field) to show either the Red question or the Blue question

    Hope this help. Please tell us if you need further assistance.

    Thanks.

     

     

  • Profile Image

    Answered by csanders_watpac on October 19, 2014 at 10:00 PM

    Hi there

    Thanks for the immediate response :-)

    No ... I'm not interested in setting the required/not required aspect ... I've got that working.

    I just want to make each of these particular questions RED whereas all the other questions on the form are another color (Blue in my case)

    I notice you said ... "you can create multiple similar questions with different color -- blue or red." ...
    The question is HOW do I choose the color for individual questions on a form?
    I can make ALL controls (questions) a particular color at the Form level but can't see how to set differing colors at a per-control (i.e. per-question) level

    - Regards Col

  • Profile Image
    JotForm Support

    Answered by ashwin_d on October 19, 2014 at 11:03 PM

    Hello Col,

    The question is HOW do I choose the color for individual questions on a form? I can make ALL controls (questions) a particular color at the Form level but can't see how to set differing colors at a per-control (i.e. per-question) level

    Yes it is possible to achieve your requirement by injecting custom css code for every question for which you want to change the font color.  Here are the steps you should follow:

    1. Find out the field name of your question. The following guide should help you:  https://www.jotform.com/help/146-How-to-find-Field-IDs-Names 

    You may also like to check the following guide:  https://www.jotform.com/help/176-How-to-apply-custom-CSS-to-a-particular-field 

    2. Inject the following custom css code in your from to change the font color:

    label#label_1 {

    color: red;

    }

    Please be noted that #label_1 will be changed based on your form's field name. Please check the following screenshot on how to find the field name and add css with the help of "Inspect Element" in the chrome browser:

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!

  • Profile Image

    Answered by csanders_watpac on October 20, 2014 at 12:26 AM

    Thanks so much - that was all I needed :-)

  • Profile Image
    JotForm Support

    Answered by ashwin_d on October 20, 2014 at 12:41 AM

    Hello Col,

    You are welcome.

    I'm very pleased that I was able to help you.

    Do get back to us if you have any questions.

    Thank you!