Question Styling: Drop Down Box

This article will show you how to format/style items within this specific question type


See the article following article if you have not added JavaScript and/or CSS to a question


Modify Dropdown Box Width

Click ADD CSS and add in the following code, editing the 30em to the width you would like it to be.  30 is used in the example.

 .cm-dropdown-input { width: 30em; }

Dropdown Box Default Text

You may need to customize the default text for a specific 'Dropdown' question while allowing all others to remain as is. 

  1. Click 'Add Javascript' and paste the following code and update the:
    1. Default text you wish to have in place ("-- TEST -- ") in line one
    2. Question number in line two
      var titles =["-- TEST --"]; /* UPDATE YOUR DEFAULT TEXT */
      jQuery("div[data-qnum=Q11] select").each(function(index){  /* UPDATE THE QUESTION NUMBER */
                      jQuery(this).find("option:first").text(titles[index])
      })
      		
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us