Dynamically add value to pillbox list
3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 22, 2020 (RSS)
By kitsguru - June 22, 2020
I am using a pillbox list built from a lookup table. I want to dynamically add a new value to the list without leaving the record I am adding/editing.
Do you have any suggestions on how to best accomplish this?
By daniel - June 22, 2020
Hi Kitsguru,
I think your best bet for achieving something like this would be to add a text field below the list field in which you can type the new option(s) (if there are multiple options, they could be separated by comma or newline). Then using a custom plugin to hook into the "record_presave" action to analyze this text field and create new records in the lookup table as necessary, and append the new record nums to the list field value (using listValues_unpack() and listValues_pack()).
Let me know if that fits your need, and/or if you have any questions about the particulars.
Thanks,
Technical Lead
interactivetools.com