Guides
Tutorials
Pop Tags

Dropdown Fields

Dropdown fields are great for letting users choose between a number of pre-defined values. Define the possible values of the dropdown by filling out the “options” field with a value on each line.

Sometimes you’ll want a different label for the value. Imagine you want to let your client/user change the look of the post by choosing between three CSS class attributes. The classes you apply could look something like “left-aligned”, “right-aligned”, “centered”. To present those options in a 'reader friendly' way, ie. uppercase and space separated, enter the following in the options box:

LeftAligned: left-aligned
RightAligned: right-aligned
Centered: centered

Applying the value of the dropdown in the template would look something like this (assuming the name alignment for the dropdown field):

<pop:entries>
  <div class="
<pop:alignment/>">
   
<h1><pop:title/></h1>
   
<pop:body/>
 
</div>
</pop:entries>
Continue to Checkboxes »