Ljuba
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 |
---|---|---|---|---|---|
Address Fields placeholder and view in CRED Forms
Started by: Ljuba in: Toolset Professional Support |
2 | 9 | 6 years, 8 months ago | ||
Required field settings for post parent and featured image
Started by: Ljuba
in: Toolset Professional Support
Problem: I would like to make the post parent field and featured image field required in my CRED form. Solution: The parent post CRED field shortcode will accept a required='true' attribute like this: [cred_field field='_wpcf_belongs_slug_id' value='' select_text='--- not set ---' class='form-control' output='bootstrap' required='true'] The featured image shortcode will not accept a required='true' attribute, so the only way to require a featured image is to use custom code. The CRED API cred_form_validate can be used to make the featured image required. Add this code to your child theme's functions.php file: add_filter( 'cred_form_validate', 'require_featured_image_validation', 10, 2 ); function require_featured_image_validation( $data, $form_data ) { $forms = array( 1234, 5678 ); 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; } Replace 1234, 5678 with a comma-separated list of any CRED form IDs where you want to make the featured image required. Relevant Documentation: https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate |
2 | 3 | 6 years, 8 months ago | ||
How to organize gallery for multipurpose (and external) usage
Started by: Ljuba
in: Toolset Professional Support
Problem: I would like to use CRED to allow my site Users to upload multiple images, and associate those images with CPTs. Some of those CPTs are child posts, some are parents, some are grandparents. What is the best way to associate the images with all levels of the CPT hierarchy? Solution: It depends on your site's requirements. There are several things to consider. |
2 | 11 | 6 years, 9 months ago | ||
What are the options for displaying different content to different users on the front-end?
Started by: Ljuba
in: Toolset Professional Support
Problem: Solution: If the thing being tested relates to the person doing the looking (the user browsing the website is registered and has a certain role because they have paid for a particular membership, for example) then you can use Access to restrict the visibility of whole pages, or to selectively show certain content on a page (as described here: https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/). If the thing being tested relates to the thing being looked at then you would need to add custom fields to the content being viewed and then use the wpv-conditional shortcodes to test the content of those custom fields and selectively display what is wrapped in the shortcode, as described here: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/ |
2 | 7 | 6 years, 9 months ago | ||
Checkboxes or taxonomy
Started by: Ljuba
in: Toolset Professional Support
Problem: Solution: See the answer below for a more detailed discussion. |
2 | 3 | 6 years, 9 months ago | ||
Breadcrumbs with Toolset
Started by: Ljuba
in: Toolset Professional Support
Problem: Solution: Relevant Documentation: |
2 | 9 | 6 years, 9 months ago | ||
‘Masked’ URL
Started by: Ljuba
in: Toolset Professional Support
Problem: The issue here is that the user wanted to attach a link to his custom field text using the link that is in another custom field. To do this please follow the structure below. <a href='[types field='my-url-field' output='raw'][/types]'>[types field='my-text'][/types]</a> This should help. |
2 | 5 | 6 years, 9 months ago | ||
Repeating fields should not be used in child posts
Started by: Ljuba
in: Toolset Professional Support
Problem: Solution: You can find the detailed explanation with the following reply: Relevant Documentation: |
2 | 3 | 6 years, 9 months ago |