Skip to content
Discussion options

You must be logged in to vote

You can make the Taxonomy Terms field type available to use by adding \Statamic\Fieldtypes\Terms::makeSelectableInForms(); your AppServiceProvider boot method.

Then you just need to create a view in resources/views/vendor/statamic/forms/fields/term.antlers.html and then you can do something like

<div class="o-form__select">
    <label class="u-sr" for="{{ handle }}">
        {{ display }}
    </label>
    <select id="{{ handle }}" class="c-select c-select--md"  name="{{ handle }}[]" {{ (validate | contains:required) ? 'required="required"' : '' }} {{ multiple ?= "multiple" }}>
        <option value>{{ if instructions }}{{ instructions }}{{ else }}Please select...{{ /if }}</option>
       …

Replies: 1 comment 20 replies

Comment options

You must be logged in to vote
20 replies
@byron-roots
Comment options

@pathly-dev
Comment options

@pathly-dev
Comment options

@byron-roots
Comment options

@pathly-dev
Comment options

Answer selected by pathly-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants