3

I'm having trouble returning the option label within a Channel:form tag.

The selected option value returns correctly using {my_drowpdown_field_name}.

However, the option label is not returned using {my_dropdown_field_name:label}.

I'd also like to display a list of possible options using the following:

    {options:my_dropdown_field_name}
            <option value="{option_value}"{selected}>{option_name}</option>
    {/options:my_dropdown_field_name}

This doesn't seem to be looping through the options. I have tried replacing {option_value} with {my_dropdown_field_name}.

Using EE 2.7.3 and P&T Fieldpack 2.1.1.

Thanks for any help!

edit: just to clarify, {my_dropdown_field_name:label} works fine within Channel:entries tags.

1

You're prefixing "options" to the field name instead of prefixing "options" with the field name.

i.e. use

{my_dropdown_field_name:options}

instead of

{options:my_dropdown_field_name}
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.