Script: Dropdown - Update Default Text
This article will help you change the default text for a dropdown question
Background
You may want to change the default dropdown text for a specific question. By default, the text reads "--Select--". See example below:
This script will help you change that to something different.
Instructions
- Program your 'Dropdown' question
- See article: Add a Question: Dropdown
- Add the following code to the 'ADD JAVASCRIPT' field
- See article: Adding JavaScript and/or CSS to a Question
- Replace the 'NEW DEFAULT TEXT' to the text you want to use instead
jQuery(".cm-dropdown-input option:eq(0)").html("NEW DEFAULT TEXT");
- You are done. Make sure to test!