Formidable offers three types of drop downs, standard, dynamic, and lookup. Dynamic and lookup are populated with data from other forms. In fact, you can actually build a dynamic dropdown from a value that's on the same form as the dropdown. I use this technique with the Formidable Masterminds Developers Directory.
Standard dropdowns are part of Formidable Lite. Dynamic and Lookup are Pro fields. Standard dropdowns can be populated dynamically from just about any data source you choose, even data that isn't in WordPress.
To understand the issue you're going to run into with edits, you need to know how these dropdowns store their data. in the database. Standard dropdown can use separate values. If you don't want to use separate values, then the label is the value.
With your example you want current year, current year + 1, and current year + 2. This is not a problem. You have to create a PHP function that with serve as callbacks for two Formidable hooks, frm_setup_new_fields_vars and frm_setup_edit_fields_vars.
So let's say you start today, the values will be 2024, 2025, and 2026. Next year, the values will be 2025, 2026, and 2027. Any entries you have from this year where the value 2024 is saved will likely produce an error if you ever need to edit the record.
In Pro, dynamic fields rock because the store the entry id of the linked record creating a virtual relationship to every field in that record. In a view, you can literally display every field in the lookup record by the record number stored in a single dropdown. It's a great feature Formidable provides.
Lookup fields store text values of the lookup field, just like standard dropdowns do.
Overview of how to use the hooks - https://formidableforms.com/knowledgebase/formidable-hooks/
Look at the examples here - https://formidableforms.com/knowledgebase/frm_setup_edit_fields_vars/
Or you can hire a developer - https://formidable-masterminds.com/developers-directory/
Personally, when I do a project for someone, I leave them with a Google Doc that explains how it was done so they can do it themselves the next time.
Thanks, Rob. I'll check these out.
Please login or Register to submit your answer