home-icon
Dropdown
Last updated: Dec 04, 2023

Introduction

The dropdown element presents the content manager with a list of options to choose from.

This element is also available for forms, enabling website users to also have a dropdown list of options.

Adding a dropdown

When adding a dropdown to a section or form, you should first specify a name.

After you have done that, you need to specify the options semicolon (;) separated.

Example: red;blue;yellow;purple, this creates a dropdown with four options (red, blue, yellow, purple).

In this case the value of the options are the same as the names. If you want to specify values and names seperately, then use the following format:

UK:United Kingdom;US:United States;NL:the Netherlands

This will present the users with a list of countries to choose from, but when they select United Kingdom for example, the stored value will be UK.

Displaying dropdown data

The dropdown data is presented in a simple PHP variable with the same name as the element.

Use this to display the value of the dropdown field: 

<?=$name_of_dropdown;?>
1