michaelB-31
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Split: Form submits after the error message
Started by: michaelB-31 in: Toolset Professional Support |
3 | 13 | 4 months ago | ||
File upload size limit
Started by: michaelB-31
in: Toolset Professional Support
Problem: I have a form using AJAX without the WordPress Media Library manager and want to limit the upload file size. Despite following the documentation and various threads, my current code does not restrict file uploads to the desired size limit. Solution: Ensure the validation code runs only for the specific form and use the $_FILES array to check the file size correctly: add_filter('cred_form_validate', 'my_validation', 10, 2); function my_validation($error_fields, $form_data) { // Ensure this code runs only for the specific form $form_id = 12345; // Replace with your actual form ID if ($form_data['id'] != $form_id) { return $error_fields; } list($fields, $errors) = $error_fields; // Validate 'wpcf-beleg-ausgabe' field if (isset($_FILES['wpcf-beleg-ausgabe']) && $_FILES['wpcf-beleg-ausgabe']['size'] > 10000) { $errors['wpcf-beleg-ausgabe'] = 'FILE SIZE TOO BIG'; } // Validate 'wpcf-beleg-einnahme' field if (isset($_FILES['wpcf-beleg-einnahme']) && $_FILES['wpcf-beleg-einnahme']['size'] > 10000) { $errors['wpcf-beleg-einnahme'] = 'FILE SIZE TOO BIG'; } return array($fields, $errors); } Relevant Documentation: https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate |
2 | 6 | 4 months, 3 weeks ago | ||
The [cred_delete_post_link] creates an empty iframe, which creates AdBlock error
Started by: michaelB-31 in: Toolset Professional Support |
2 | 5 | 2 years, 3 months ago | ||
"Use the WordPress Media Library manager for uploads" not working
Started by: michaelB-31 in: Toolset Professional Support |
2 | 4 | 3 years, 4 months ago | ||
Performance problem with large tables (legacy post relationships)
Started by: michaelB-31 in: Toolset Professional Support |
2 | 13 | 3 years, 4 months ago | ||
Whole Layouts module not working after update (really slow / timeouts)
Started by: michaelB-31 in: Toolset Professional Support |
2 | 11 | 3 years, 5 months ago | ||
CRED file upload: jQuery change event not working/firing as expected
Started by: michaelB-31
in: Toolset Professional Support
Problem: I would like to know how to execute some custom JavaScript when specific events are triggered by the CRED file upload process. Solution: Customizing this behavior is outside the scope of support we provide here in the forums, because there is no CRED JavaScript API. The file upload component used by CRED is documented on github and lists several event handlers you can investigate. Bind your code to the window 'load' event to initialize CRED form elements, and use the namespace 'jQuery' instead of '$': jQuery(window).bind( 'load', function(){ // your code goes here }); Relevant Documentation: https://github.com/blueimp/jQuery-File-Upload/wiki/Options#callback-options |
2 | 2 | 6 years, 10 months ago | ||
CRED file upload field: The "for" attribute of my label element gets changed
Started by: michaelB-31 in: Toolset Professional Support |
1 | 2 | 6 years, 11 months ago | ||
Remove "Operation completed successfully" message after Ajax submission
Started by: michaelB-31 in: Toolset Professional Support |
2 | 3 | 7 years, 1 month ago |