zacharyL
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 |
---|---|---|---|---|---|
Having Problem with Restricting File Types on File Upload CRED Field
Started by: zacharyL
in: Toolset Professional Support
Problem: I would like to enforce file type restrictions on a file upload field in a Form, but the cred_form_validate hook does not provide any information about the file uploads. Solution: Use the cred_file_upload_disable_progress_bar hook to inspect AJAX file uploads. Inspect the $_FILES superglobal to retrieve file metadata. //*Validate for PDF on File Upload add_filter('cred_form_ajax_upload_validate','cred_filetype_validation',10,2); function cred_filetype_validation($error_fields, $form_data) { $file_types = array('application/pdf','image/jpeg','image/png','image/tiff','image/gif'); // Field data are field values and errors list($fields,$errors)=$error_fields; //Run the rest of code for this CRED ONLY and IF the file is upload type and size are set. if (in_array($form_data['id'], [654,836,848]) && (isset($_FILES['wpcf-pedigree']['type']))) { //Retrieve file type $file_type_uploaded=$_FILES['wpcf-pedigree']['type']; //Validate files uploaded, make sure its PDF file type if (!in_array($file_type_uploaded, $file_types) ) { //Validation failed, // set error message per field //Remove wpcf - prefix here! $errors['pedigree']='Sorry the file you have uploaded is not of the correct type. Accepted file types: pdf, jpg, gif, png, tiff'; } } //return result return array($fields,$errors); } Relevant Documentation: |
2 | 6 | 6 years, 4 months ago | ||
toolset overriding divi javascript on pages using toolset layout
Started by: zacharyL in: Toolset Professional Support |
2 | 2 | 6 years, 4 months ago | ||
Location Filter Problems
1
2
Started by: zacharyL
in: Toolset Professional Support
Problem: I am trying to use a distance filter in a WordPress Archive but it does not seem to be working. Solution: Distance filters in WordPress Archives are not currently functional. We hope to fully support this feature in an upcoming release, but for now, the best approach is to create a View with a distance filter and insert it in a WordPress Archive. Remove everything in the wpv-loop tags of the Wordpress Archive's Loop Output editor. |
2 | 23 | 6 years, 5 months ago | ||
Automatic Login Upon CRED User Form Submission
Started by: zacharyL
in: Toolset Professional Support
Problem: Solution: You can find proposed solution, in this case, with the following reply: Relevant Documentation: |
3 | 4 | 6 years, 5 months ago | ||
Dynamically Populate Taxonomy Term Select Field
Started by: zacharyL
in: Toolset Professional Support
Problem: In a CRED form for creating post, We initially had a post taxonomy term select field that was automatically populated based on the page it was on. These industry pages were given the same custom taxonomy we created for the CPT post that was to be created from these forms, and assigned the appropriate taxonomy term to match the term the post needed to go to. The idea was that the user shouldn't have to worry about selecting an option from a "Choose Industry" field when they're already on a page designating the industry they're interested in. We had it working, but for whatever reason it no longer is, so I'm wondering if there was a PHP solution that I could utilize for this case. Solution: There isn't such a built-in feature within CRED forms, see our document: https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field The argument "value" works only for custom field in CRED form, it does not work for the taxonomy field. As a workaround, you can setup a generic field in the CRED form to replace the taxonomy field: https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_generic_field When user submit the CRED form, you can use CRED action hook "cred_save_data" to trigger a PHP function, and save the "industry" value into database, see documents: https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data This hook allows doing a custom action when post data is saved to database. https://codex.wordpress.org/Function_Reference/wp_set_object_terms See the solution with codes: https://toolset.com/forums/topic/dynamically-populate-taxonomy-term-select-field/#post-900063 Relevant Documentation: |
2 | 9 | 6 years, 5 months ago | ||
Unable to Display Marker with Google Maps Shortcode
Started by: zacharyL
in: Toolset Professional Support
Problem: I am trying to display a map on my child post, and insert a marker using the address field of a parent post. The marker is not appearing and the map is showing the ocean. Solution: Ensure the address field is set correctly, and use the id operator and specify the parent post type slug in the marker shortcode: [wpv-map-marker map_id="unit-map" marker_id="unit-marker" marker_field="wpcf-property-address" id="$property"][/wpv-map-marker] Relevant Documentation: |
2 | 5 | 6 years, 9 months ago | ||
Unable to Register Key on Site
Started by: zacharyL in: Toolset Professional Support |
2 | 4 | 6 years, 11 months ago | ||
CRED Form Submitted Custom Taxonomy for Custom Post Type
Started by: zacharyL in: Types Community Support |
2 | 5 | 7 years ago | ||
Site Options Pages using Types Fields
Started by: zacharyL in: Toolset Professional Support |
6 | 7 | 7 years, 2 months ago | ||
Clicking "Save" on Divi Visual Builder clears Toolset Layout selection for Page
Started by: zacharyL in: Toolset Professional Support |
2 | 7 | 7 years, 2 months ago | ||
“Single Product” template is missing it’s Product Description
Started by: zacharyL
in: Toolset Professional Support
Problem: I use Divi, WooCommerce, and Toolset plugins together. When I activate WooCommerce Views and select the WC Views template for single Products, I am no longer able to see the Product's Long Description in the single Product page. Solution: Use the post body shortcode inside your single Product Content Template to display the long description: [wpv-post-body view_template="None"] Relevant Documentation: https://toolset.com/documentation/user-guides/getting-started-woocommerce-views/ |
2 | 5 | 7 years, 2 months ago | ||
Divi Theme Integration for Power Users
Started by: zacharyL in: Toolset Professional Support |
2 | 3 | 7 years, 2 months ago | ||
New Divi Integration & WooCommerce Views Issues
Started by: zacharyL in: Toolset Professional Support |
2 | 12 | 7 years, 3 months ago | ||
SQL GROUP BY not working & Pagination Broken
Started by: zacharyL in: Toolset Professional Support |
2 | 7 | 7 years, 3 months ago | ||
wpv_filter_query & wpv_filter_query_post_process not firing
Started by: zacharyL in: Toolset Professional Support |
2 | 3 | 7 years, 3 months ago |