[Gelöst] Filter dropdown menu populated with multiple values from a comma-separated field
This support ticket is created vor 3 Jahre, 4 Monate. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I don't suppose it is possible to generate a select menu of options from a single line text field that has comma-separated data? For example, I have one CPT field for the model years supported for a car part. Entered into this field is "2014, 2015, 2016, 2017, 2018". Using this field to create a filter select menu of course renders that entire value into on option like so:
What I'd like to do is have Toolset parse that field and create a select menu from those comma-separated values that is more like:
<select>
<option value="" selected="selected">Select Year</option>
<option value="2014">2014</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
<option value="2016">2016</option>
.... and so on.
</select>
I know I can achieve this using a repeater field instead of single line text field like I am, but using a single line text field would technically be a lot easier for data entry. Hope this makes sense.
Okay, I see that these are "manually" entered values. I want them to be automatically populated by the vehicles entered into the database. Manually entering them means I have to remember to update this filter every time a new year may come about (either older or newer) as opposed to just entering new vehicles that may incorporate new years. For instance: