gregM-8
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Viewing 2 topics - 1 through 2 (of 2 total)
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Featured image (Media Library manager) as required field
Started by: gregM-8
in: Toolset Professional Support
Problem: Validate featured image in Toolset post form. Solution: You can try the cred_form_validate filter hook, like this: Put below PHP codes into your theme file "functions.php": add_filter( 'cred_form_validate', 'require_featured_image_validation', 10, 2 ); function require_featured_image_validation( $data, $form_data ) { $forms = array( 225 ); if( in_array( $form_data['id'], $forms ) ){ list($fields,$errors)=$data; if (empty($fields['_featured_image']['value'])) { $errors['_featured_image'] = __( 'Featured image is required', 'your-language-domain'); } $data =array($fields,$errors); } return $data; } Relevant Documentation: https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate |
2 | 4 | 3 years, 7 months ago | ||
Display newly created post in the Cart and Checkout pages.
Started by: gregM-8 in: Toolset Professional Support |
2 | 3 | 3 years, 11 months ago |
Viewing 2 topics - 1 through 2 (of 2 total)