FelipeP5703
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 |
---|---|---|---|---|---|
Php function for limiting size of images uploaded NOT working
1
2
Started by: FelipeP5703
in: Toolset Professional Support
Problem: I would like to use the Forms API to validate each image that is uploaded in a single or repeating custom field. It doesn't seem to be working, in the logs I see a PHP notice about trying to get property of a non-object. Solution: Make sure the User has permission to publish Media if you are using Toolset Access Control. Make sure the Form's markup structure doesn't include any extra closing div tags. Use the following custom code to validate a repeating image field: add_filter('cred_form_ajax_upload_validate','rep_img_size_validation',10,2); function rep_img_size_validation($error_fields, $form_data) { error_log(' validation script is invoked '); $forms = array( 29, 49 ); $size = 1024000; $field_slug = 'your-repeating-image-slug'; $error_msg = 'Maximum size is 1MB, please try again.'; //field data are field values and errors list($fields,$errors)=$error_fields; //validate if specific form if (in_array( $form_data['id'], $forms ) && isset($fields['wpcf-' . $field_slug]['field_data']['size'])) { //check if this field instance img is bigger than $size (bytes) $instance_size = array_pop($fields['wpcf-' . $field_slug]['field_data']['size']); if ( $instance_size > $size ) { //display error message for this field instance $errors['wpcf-' . $field_slug] = $error_msg; } } //return result return array($fields,$errors); } To validate a single field, copy the code above and make the following adjustments: // for repeating images // $instance_size = array_pop($fields['wpcf-' . $field_slug]['field_data']['size']); // for single images $instance_size = $fields['wpcf-' . $field_slug]['field_data']['size']; Relevant Documentation: |
2 | 20 | 5 years, 7 months ago | ||
Automatically logout user when changing password or email
Started by: FelipeP5703 in: Toolset Professional Support |
2 | 3 | 5 years, 7 months ago | ||
Custom post not assigned to User (Author) automatically
Started by: FelipeP5703 in: Toolset Professional Support |
2 | 7 | 5 years, 7 months ago | ||
Permission denied for editing forms
1
2
Started by: FelipeP5703 in: Toolset Professional Support |
4 | 31 | 5 years, 7 months ago | ||
Logout Link with Toolset
Started by: FelipeP5703
in: Toolset Professional Support
Problem: Solution: Relevant Documentation: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-logout-link |
2 | 3 | 5 years, 7 months ago | ||
Conditional Output for custom search is not working
Started by: FelipeP5703
in: Toolset Professional Support
Problem: I have conditional HTML in place in a custom search View's filter area, but it doesn't seem to be working as expected. Solution: Conditional HTML is designed to respond to the properties of posts, not selected search filters. Using conditional HTML to respond to selected filters is not going to work consistently, even if you find certain edge cases where it appears to be working briefly. If you'd like to see more filter dependency features built into the system, I encourage you to submit your request here: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/ |
2 | 9 | 5 years, 7 months ago | ||
Custom Search Result not working properly
Started by: FelipeP5703 in: Toolset Professional Support |
2 | 9 | 5 years, 7 months ago | ||
Multiple Views doesn’t work properly
Started by: FelipeP5703
in: Toolset Professional Support
Problem: I created two views. One only shows the results, and the other is for search and show results. When I add both of them to the same page, the custom search doesn't work and the site breaks. The button doesn't work either. Solution: It is a compatibility problem with custom theme: You can locate the problem by this: Relevant Documentation: |
2 | 15 | 5 years, 7 months ago | ||
Apply conditions in Toolset Forms
Started by: FelipeP5703
in: Toolset Professional Support
Problem: Solution: Relevant Documentation: |
2 | 5 | 5 years, 8 months ago | ||
Split: set default select option for custom search filter
Started by: FelipeP5703 in: Toolset Professional Support |
2 | 6 | 5 years, 8 months ago | ||
Repeatable fields are not showing on search parameters
Started by: FelipeP5703 in: Toolset Professional Support |
3 | 11 | 5 years, 8 months ago | ||
Conditional Display in front-end when option selected
Started by: FelipeP5703 in: Toolset Professional Support |
2 | 13 | 5 years, 8 months ago | ||
Split: Whatsapp link (Click to chat) shortcode – hide empty elementor widget content
Started by: FelipeP5703 in: Toolset Professional Support |
2 | 6 | 5 years, 8 months ago | ||
Whatsapp link (Click to chat) shortcode
1
2
Started by: FelipeP5703 in: Toolset Professional Support |
2 | 17 | 5 years, 8 months ago | ||
Repeatable Fields front-end display
Started by: FelipeP5703 in: Toolset Professional Support |
2 | 5 | 5 years, 8 months ago |