Multiple image selector form helper
Permalink
Has anyone built a multiple image selector form helper? Just like the helper that comes with Concrete for selecting single files/images, but allows you to select multiple images?
I'm building a package where I need to allow the user to associate multiple photos with a venue. So I have a venue "add/edit" form with all of the details of the venue, and I want the user to be able to select multiple photos in the regular assets dialog and show them on the form. I was hoping someone might have come across this already...
I'm building a package where I need to allow the user to associate multiple photos with a venue. So I have a venue "add/edit" form with all of the details of the venue, and I want the user to be able to select multiple photos in the regular assets dialog and show them on the form. I was hoping someone might have come across this already...
To make this work you need to have a javascript function that serves as a callback for the file manager, which will pass all of the selected file id's to you, and then it's up to you to populate your editing interface with those selections and save them to the database (you'll need an additional table to store those records in for your block, which will have a many-to-one relationship with the block's primary table).
Look at the slideshow block's code to see how this works (the callback handler will be in auto.js). It's pretty messy, though -- I can probably dig up some cleaner code somewhere for this if you're interested.
-Jordan