- This topic has 2 replies, 2 voices, and was last updated 11 months, 2 weeks ago by .
-
Topic
-
I’m trying to get a drop down menu pre-filled with a default value, but it looks like both the select and select_advanced field types ignore this common setting?
Example code below is based on the example on the docs:
https://docs.metabox.io/fields/select-advanced/array( 'name' => 'Select Advanced', 'id' => 'select_advanced', 'type' => 'select_advanced', 'placeholder' => 'Select an Item', 'options' => array( 'java' => 'Java', 'javascript' => 'JavaScript', 'php' => 'PHP', 'csharp' => 'C#', 'objectivec' => 'Objective-C', 'kotlin' => 'Kotlin', 'swift' => 'Swift', ), // This doesn't seem to work 'std' => 'php' )
Tested this in v5.2.10 (via composer).
How can I set the default option of a select element?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.