Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is there a way to use this module/widget in a custom form built with the form API?
Comments
Comment #1
czigor CreditAttribution: czigor commentedHave you tried
?
Comment #2
czigor CreditAttribution: czigor commentedClosing this due to lack of feedback.
Comment #3
zelenovas CreditAttribution: zelenovas commentedTrying make it work in my custom module with Form API... but it doesn't work :(
When I push the "Upload" button the throbber appears for a second and nothing more happens.
Can you tell me what am I doing wrong?
My module code for form function:
My configuration:
Widget works great out of the box in node edit form.
Please help.
Thanks.
Comment #4
zelenovas CreditAttribution: zelenovas commentedComment #5
zelenovas CreditAttribution: zelenovas commentedComment #6
paupale CreditAttribution: paupale commentedI created a new custom form
When I press "Upload" I have the same problem, the throbber appears and I get:
Notice: Undefined index: _0 in mfw_managed_file_save_upload() (line 147 of /home/paulius/sites/palevicius.lt/eurosplint/sites/all/modules/multiupload_filefield_widget/multiupload_filefield_widget.module).
Notice: Undefined index: _0 in mfw_managed_file_save_upload() (line 147 of /home/paulius/sites/palevicius.lt/eurosplint/sites/all/modules/multiupload_filefield_widget/multiupload_filefield_widget.module).
I also tried adding '#parents' = array('image', 'und', 0), but now only one file is visible after upload. Any ideas if it is possible to make this module work with FAPI?
Comment #7
parisekThis is good article how to solve this in custom module (without any module) - https://coderwall.com/p/rsv9ra/d7-multiple-file-upload