I have a dynamic field dropdown that loads options from a second form. What I'd like to do: When the user types in something that's not in the current list, have the new item added to the list and displayed like the pre-existing options, instead of the "No results match" text.
Is this already possible?
My current plan is:
A) Form A has the dynamic dropdown (multiselect=true) that loads options from Form B
B) Form A also has a dropdown with the CSS class frm_Hidden. The idea being that new options get added
here
C) ?? - Not sure how to hook into the search
D) On the backend, have a filter for frm_pre_create_entry / frm_pre_update_entry that 1) goes through the new values, 2) does a $new_id = FrmEntry::create() to add it to Form B, 3) then adds $new_id to existing values array But, I'm not seeing a way to hook into the search.
Is this possible?
Thanks Vic. I got this working this morning, so I'll close this question. But adding a couple of notes in case anyone else finds it useful.
On the front end, SlimSelect has an events.addable that I could hook into. Didn't need the hidden drop down.
On the back end, found that I had to use the frm_after_create_entry and frm_after_update_entry hooks, instead of the filters.
Please login or Register to submit your answer