Manaus Posted March 7, 2014 Share Posted March 7, 2014 Hello, I have the setMaxFiles(1) function in a script for file uploading, but the field is set to 3 for Maximum Files Allowed. Is there any conflict between the two? I guess the field definition wins, but why using the function then? Thanks! Link to comment Share on other sites More sharing options...
horst Posted March 8, 2014 Share Posted March 8, 2014 I have the setMaxFiles(1) function in a script for file uploading, but the field is set to 3 for Maximum Files Allowed. Is there any conflict between the two? I guess the field definition wins, but why using the function then? Hi, I think you need to save the field after calling setMaxFiles. Link to comment Share on other sites More sharing options...
Manaus Posted March 9, 2014 Author Share Posted March 9, 2014 Thanks Horst, what I mean is what is setMaxFiles for? I can't get it from the docs (indeed I think the Wireupload is missing from the API docs) Link to comment Share on other sites More sharing options...
horst Posted March 9, 2014 Share Posted March 9, 2014 Oh, if it isn't in the docs or when I cannot find it, I look into the code: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/WireUpload.php#L85 using the browsers "find function" searching for "maxFiles" point me quickly to the interesting parts. So, best would be to have it in the docs, but to look at the code is better than nothing Link to comment Share on other sites More sharing options...
Soma Posted March 9, 2014 Share Posted March 9, 2014 On an inputfield on front end form you use $f->maxFiles = n 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now