New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →


Eike Bierman December 31, 2020 by Eike Bierman


how can i get from the select field ( in the form ) key/value for the "< option > VALUE < /option >".

My yaml file:

handle: test
 display: Test
 multiple: false
 clearable: false
 searchable: true
 taggable: false
 push_tags: false
 cast_booleans: false
 listable: hidden
  test: Test
  Test2: Test2
 type: select
 icon: select
 placeholder: ''
 input_type: '' 

My HTML file:

<select id="contact-{{display}}" name="salutation" class="form-control custom-select" required>
            <option hidden disabled selected value></option>

            {{ options }}
            <option value="{{key}}">{{value}}</option>
            {{ /options }}

        <label class="form-label" for="contact-{{display}}">{{display}}</label>
Answered by Eike Bierman!
>>>>>>> Answered <<<<<<<
3 Replies
1 Follower