Ljuba
Fils de soutien créés au cours des 30 derniers jours : 0
Sujets de forum favoris
This user has no favorite topics.
Sujets de forum créés
Status | Sujet | Supporter | Voix | Publications | Nouveauté |
---|---|---|---|---|---|
Address Fields placeholder and view in CRED Forms
Commencé par : Ljuba in: Toolset Professional Support |
2 | 9 | Il y a 6 années et 9 mois | ||
Required field settings for post parent and featured image
Commencé par : 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 | Il y a 6 années et 9 mois | ||
How to organize gallery for multipurpose (and external) usage
Commencé par : 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 | Il y a 6 années et 9 mois | ||
What are the options for displaying different content to different users on the front-end?
Commencé par : 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 | Il y a 6 années et 9 mois | ||
Checkboxes or taxonomy
Commencé par : Ljuba
in: Toolset Professional Support
Problem: Solution: See the answer below for a more detailed discussion. |
2 | 3 | Il y a 6 années et 9 mois | ||
Breadcrumbs with Toolset
Commencé par : Ljuba
in: Toolset Professional Support
Problem: Solution: Relevant Documentation: |
2 | 9 | Il y a 6 années et 9 mois | ||
‘Masked’ URL
Commencé par : 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 | Il y a 6 années et 9 mois | ||
Repeating fields should not be used in child posts
Commencé par : Ljuba
in: Toolset Professional Support
Problem: Solution: You can find the detailed explanation with the following reply: Relevant Documentation: |
2 | 3 | Il y a 6 années et 9 mois |