0
I’m using the Octobercms framework, and in it I use a plugin called Magic Form (by Martin M.), and the normal form (with text inputs) works perfectly, all inputs are recorded in the database, I’ve never had a problem with it. But when I use the Magic Form to try to upload files through the form, it doesn’t work, even following the guidelines I find on the plugin’s own page. I wonder if anyone has used this plugin and managed to make it work for the upload. Inside my page, both plugins (generic form, and upload form) are installed, and the code I’m using (taken from: https://skydiver.github.io/october-plugin-forms/docs/components/upload/) to insert the upload form is this:
{{ form_ajax(__SELF__ ~ '::onFormSubmit') }}
<div id="{{ __SELF__ }}_forms_flash"></div>
<!-- YOUR FORM FIELDS -->
{% partial '@file-upload' %}
{{ form_submit() }}
{{ form_close() }}
where "__ SELF __"is replaced by the name I have chosen for the form. Another interesting thing is that the "Browse" button that the plugin inserts, does not work:
<button type="button" class="ui button btn btn-default upload-button">
Browse
</button>
If you swap the type for "input type="file"", it works, but still does not write to the database. From now on I give you any help!