Lookup field : how to create an entry if no lookup field match

By: Dimitri Louis | Asked: 07/14/2022
ForumsCategory: General questionsLookup field : how to create an entry if no lookup field match
Dimitri Louis asked 2 years ago
Hi,   I have created a form ARTIST with a field called "ARTIST Name" and Im calling this field as a lookup field in another form. This works great, I can access the ARTIST Name. But if I can't find the artist Im looking for would it be possible to edit the ARTIST form straight from the Lookup field ? I think I know the answer, its problably not possible but wanted to ask.   Thanks for your help,   Dimitri
3 Answers
Victor Font answered 2 years ago
You can do what you want using Formidable hooks but not by directly editing a lookup's dropdown. A standard dropdown gives you the option to "Add Other". This opens a text field if "Other" is the selected option. Lookup tables don't have this feature, but it doesn't mean you can't simulate it. You can use the frm_setup_new_fields_vars and frm_setup_edit_fields_vars filters to add an "Other" option to the lookup field before it is rendered on the page. Then, if "Other" is selected, conditionally open a text field to add the new musician's name. For the last step, use the frm_after_create_entry hook to add the new value to the lookup table.
Dimitri Louis replied 2 years ago

Thank you so much !

Bobby Clapp answered 2 years ago
I typically add the feeder form into a popup accessible via a button in the page or via a menu item. You'll then want to limit the forms access to admins or whatever is appropriate at the form settings level. https://formidableforms.com/knowledgebase/general-form-settings/#kb-form-permissions
Dimitri Louis replied 2 years ago

Thats pretty smart !

Dimitri Louis answered 2 years ago
Thanks !   Ill look at you guys suggestion soon and report back.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right