Support

Account

Home Forums General Issues Dropdown list

Solving

Dropdown list

  • Hey guys,

    I was wondering, is it possible to create a dropdown list on the front end, that can be populated by adding numbers in the admin?

    At the moment I’m using

    <select>
    <option>1</option>
    <option>2</option>
    </select>
  • Not specifically – most ACF fields are designed to be accessed using code and formatted as needed.

    You might want to check out the Repeater Field – this will allow you to enter as many lines as you want, and then you’ll have to do some PHP in your template to make it display as a dropdown.

  • Hi @lwensveen

    Yes, I too would recommend using the repeater field. This will allow you to populate multiple rows of data. In each row, you could have a number field.

    Then on the front end, you can read in this data, and loop through the rows, and create the select field’s option tags based on the number value.

    Good luck

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.