Set Dropdown Field Default Value With Javascript
Author: Aleš Sýkora, 30. 8. 2019
If you want to change the -not set- text when using the dropdown field in Toolset form, you must use custom JavaScript. Here is a tutorial how to do it.
Custom Javascript rule to set default dropdown value
Your dropdown field should look like this:
[cred_field field='field-name' force_type='field' class='form-control' output='bootstrap' value='']
Open the form editor and click to the JS editor. Add the jQuery code from below and do not forget to change the field-name and Your-text values ;-).
jQuery(document).ready(function($){
$("select[name='field-name'] option[value='']").text("Your-text");
});