toolset-dave
Fils de soutien créés au cours des 30 derniers jours : 1
Sujets de forum favoris
This user has no favorite topics.
Sujets de forum créés
Status | Sujet | Supporter | Voix | Publications | Nouveauté |
---|---|---|---|---|---|
Translation in Parent selector
Commencé par : toolset-dave in: Toolset Professional Support |
2 | 3 | Il y a 7 années | ||
Translation of Date field
Commencé par : toolset-dave in: Toolset Professional Support |
2 | 10 | Il y a 7 années | ||
Plus minus input in CRED form
Commencé par : toolset-dave in: Toolset Professional Support |
2 | 4 | Il y a 7 années | ||
After updating CRED plugin to 1.9.3 image upload does not work
Commencé par : toolset-dave in: Toolset Professional Support |
2 | 5 | Il y a 7 années | ||
Checkbox in CRED user form doesn´t work as it should
Commencé par : toolset-dave
in: Toolset Professional Support
Problem: Solution: If problem still appears after applying above patch, then you can use this following JS in CRED JS editor: jQuery(document).ready(function($){ var i = $('#terms_and_condition').find('input').attr('id'); $('#terms_and_condition').find('label').attr('for', i); }); |
2 | 7 | Il y a 7 années | ||
Fields in custom validation error box
Commencé par : toolset-dave in: Toolset Professional Support |
2 | 5 | Il y a 7 années | ||
Custom CRED form validation for Types fields
Commencé par : toolset-dave
in: Toolset Professional Support
Problem: Solution: Relevant Documentation: |
3 | 5 | Il y a 7 années | ||
Delay in CRED field Date picker
Commencé par : toolset-dave
in: Toolset Professional Support
Problem: Solution: |
2 | 3 | Il y a 7 années | ||
Featured image as required field
Commencé par : toolset-dave
in: Toolset Professional Support
Problem: Solution: function my_validation($field_data, $form_data) { list($fields,$errors)=$field_data; if ($form_data['id']==488) //change form ID { if (empty($fields['_featured_image']['value'])) { $errors['_featured_image'] = 'Missing featured image'; } } return array($fields,$errors); } add_filter('cred_form_validate','my_validation',10,2); Also check that there should be no php errors and syntax mistakes in theme’s OR Child theme’s functions.php Relevant Documentation: |
2 | 7 | Il y a 7 années | ||
Add custom validation for featured image sizes to CRED forms
Commencé par : toolset-dave
in: Toolset Professional Support
Problem: Solution: The validation for images occurs when the form is submitted (rather than when the image is inserted in the form and uploaded via ajax to the server). Relevant Documentation: |
3 | 6 | Il y a 7 années | ||
Use custom function or custom shortcode in conditional HTML
Commencé par : toolset-dave
in: Toolset Professional Support
Problem: I have created a custom shortcode that I would like to use in conditional HTML evaluation, but it doesn't seem to be working correctly. I have tried using the function directly, and tried registering the shortcode in Functions inside conditional evaluations, but neither seems to help. Solution: Register the shortcode, not the function name, in the Third-party shortcode arguments area in Toolset > Settings > Frontend Content. Or, register the function name, not the shortcode, in Functions inside conditional evaluations. Then use the corresponding code. If you use the function name, it should be followed by () to indicate a function. If you use the shortcode, surround the name in []: [wpv-conditional if="( my_post_count_func() eq '0' )"]Something[/wpv-conditional] [wpv-conditional if="( '[my-post-count]' gte '1' )"]Something else[/wpv-conditional] Relevant Documentation: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-shortcodes-in-conditions/ |
2 | 9 | Il y a 7 années | ||
Custom text instead of "You can add only images."
Commencé par : toolset-dave in: Toolset Professional Support |
2 | 5 | Il y a 7 années | ||
Sorting and styling dates from a repeating custom field
Commencé par : toolset-dave
in: Types Community Support
Problem: I have a repeating "date" type custom field. I would like to sort the dates in chronological order, and I would like to apply a strike-through style to the dates that occurred in the past. Solution: add_shortcode( 'sort_and_format_post_date_fields', 'sort_and_format_post_date_fields_func'); function sort_and_format_post_date_fields_func($atts = []) { $atts = shortcode_atts([ 'postid' => '', 'field' => '', 'format' => 'l F jS Y', ], $atts); $values = get_post_meta($atts['postid'], 'wpcf-my-date'); usort($values, 'numbersort'); $string = ''; foreach($values as $value) { $date = date_i18n($atts['format'], $value); $prefix = $value < strtotime('0:00:00') ? '<span style="text-decoration:line-through;">' : ''; $suffix = $value < strtotime('0:00:00') ? '</span>' : ''; $string .= ($string == '' ? '' : ', ') . $prefix . $date . $suffix; } return $string; } function numbersort($a, $b) { $res = 0; if ( $a > $b) { $res = 1; } return $res; } Then use it by placing this in the content of the post that includes the date field: [sort_and_format_post_date_fields postid="[wpv-post-id]" field="my-date" format="l F jS Y"] Relevant Documentation: |
2 | 9 | Il y a 7 années | ||
Custom validation error message does not show
Commencé par : toolset-dave
in: Toolset Professional Support
Problem: Solution: OR to display it inline with each field, we can change front end messages in CRED form by using JS. Please add following code CRED form >> JS editor section of your form: jQuery(document).ready(function() { jQuery('input[name="wpcf-custom-field"]') .data('wpt-validate', { required: { args: { 1: true }, message: 'Custom Notification goes here' }, } ); }); |
2 | 15 | Il y a 7 années et 1 mois | ||
Function for formating money causes warning
Commencé par : toolset-dave
in: Toolset Professional Support
Problem: Solution: function format_money( $atts ) { extract( shortcode_atts( array( 'price' => '0'), $atts) ); return $price = number_format($price, 0, ',', ' '); } add_shortcode('format_money', 'format_money'); Relevant Documentation: |
2 | 3 | Il y a 7 années et 1 mois |