Comments (9)
Not sure if there is possible right now (i will take a look).
Maybe is time to start thinking on another upload component...
from october-plugin-forms.
http://blueimp.github.io/jQuery-File-Upload/index.html
from october-plugin-forms.
+1 for the plugin linked above. Very good plugin that may help for a better integration of upload system to magicform.
Edit, here is a link from the plugin documentation :
https://github.com/blueimp/jQuery-File-Upload/wiki/Multiple-File-Input-Fields-in-One-Form
It can manage multiple upload widget in one form out of the box. It's a good start to make the upload field to works like the others fields.
from october-plugin-forms.
Hello,
Any update with this ? I don't have enought october cms skill (yet) to help, but the jquery file upload solution linked above could be a very good solution.
from october-plugin-forms.
Hello @Alex360hd, i made a few test some time ago (unfortunately don't have to much free time).
Using the plugin it's easy, the difficult part is the integration with October attachments and saving the files before submit the form.
The current upload was easy because there was already a plugin doing all this task.
I'm interested on this issue, but as i say, don't have free time right now 😞
from october-plugin-forms.
Hello,
Do you have an edge version of the module with the integration with the jquery file upload plugin ? To clearly see what's missing with october attachments to make it works.
from october-plugin-forms.
@Zmove don't have any code, i've deleted my tests because was useless, sorry
from october-plugin-forms.
For anyone coming across this issue a hacky way around this I have implemented is by adding a session within the checkUploadAction function in ComponentUtils.php in the traits folder. This triggers and adds the session when a file is uploaded.
Within MagicForm.php in the onFormSubmit method check if _uploader is set. If isset then check for the file uploaded session created above. If it's not found add to the $rules and $msgs variables to output the validation message.
If you may multiple forms and some might not require the file upload you may need to add a hidden field which can be checked if isset along with the _uploader field.
Finally add the Session::forget() method when the record is saved to the database and within the onRemoveAttachment method in the fileuploader.php file (incase a user removes the file and forgets to add another).
Hope this helps.
from october-plugin-forms.
Hi! I saw this post and I have the same need...
How can I make file upload required on a Form within magic forms plugin?
Any help will be very welcome!
@TonnnnUK gave a great solution but I don't know how to implement...
If anyone have a simplest way, it will be fine!
Thank you in advance!
from october-plugin-forms.
Related Issues (20)
- Plugin breaks in Build >1.0.469 HOT 5
- The specified file extension [js] is invalid HOT 2
- No buttons on component input fields HOT 5
- Translate fields name in backend
- Error 405 caused by field validation on live server
- Post AJAX not Working. HOT 1
- Bug HOT 2
- Image/file validation error HOT 2
- reCAPTCHA does not work HOT 1
- Error code 406 after validation
- proc_open() has been disabled for security reasons
- Sending the form with the October JavaScript API instead of Data attributes gives 406 Not Acceptable
- Expected response code 250 but got code 550 HOT 3
- File uploaded on the storage but not displayed in the record and email. HOT 1
- Laravel Validation HOT 13
- How to add auto response email field in generic forms? HOT 3
- DE translation mistake
- Using Magic Form on October CMS 3 HOT 2
- Currently Getting this Error when submitting my Ajax Upload Form HOT 1
- Magic Forms does not support October CMS v3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from october-plugin-forms.