Hi,
I need some help about advmultiselect.
I've added a transient field (type advmultiselect) in the field.ini of my table, and I want to use the items selected in a trigger function.
How to do that ?
Thanks in advance!
Babs
advmultiselect
3 posts
• Page 1 of 1
advmultiselectHi,
I need some help about advmultiselect. I've added a transient field (type advmultiselect) in the field.ini of my table, and I want to use the items selected in a trigger function. How to do that ? Thanks in advance! Babs
In the beforeSave() or afterSave() trigger you can check the values that have been inserted as a result of this field.
e.g.
Once you see how the data has been encoded, you can do with it as you please. (I'm giving your the fishing pole on this one because I don't have any handy examples to show what the data will look like...). Once you've done this you might think of posting some of this back to the forum as it could be interesting to others in the community. Best regards Steve
Hi,
Thank you Steve. I've modified the code in Formtool/advmultiselect.php in order to take relationships into account (same option as checkboxes):
the "print_r" you suggested gives:
"id" is the name of the primary index of my table. So we just have to do this:
to display the ids of the selected items. Thank you for helping!
3 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 24 guests |