andrewB-7
Admite hilos creados en los últimos 30 días: 0
Debates favoritos del foro
Este usuario no tiene debates favoritos.
Temas del foro creados
Status | Debate | Supporter | Voces | Mensajes | Caducidad |
---|---|---|---|---|---|
Accept .jfif file format for images
Iniciado por: andrewB-7 en: Toolset Professional Support |
2 | 5 | hace 6 años, 5 meses | ||
Upload of the .jfif file type in CRED forms
Iniciado por: andrewB-7 en: Toolset Professional Support |
2 | 5 | hace 6 años, 5 meses | ||
Limit number of characters/words output by multiline text field in PHP archive
Iniciado por: andrewB-7
en: Toolset Professional Support
Problem: The issue here is that the user wanted to limit the word that is being displayed from a custom field in php. Solution: The user is currently using this to display his custom field using PHP <?php if(types_render_field("author-member-new-bio", array('class'=>''))){?> <?php echo(types_render_field("author-member-new-bio", array('class'=>''))); ?> <?php }?> This can be done by using the wp_trim_words function as you can see from this it can be used to trim the words. <p class="paragraph-about"><?php echo wp_trim_words( get_field('author_member_new_bio'), 60, '...' ); ?></p> |
2 | 4 | hace 6 años, 5 meses | ||
URGENT Latest version of Types causing site to break
1
2
Iniciado por: andrewB-7 en: Toolset Professional Support |
3 | 17 | hace 6 años, 5 meses | ||
Make CRED fields required, but do not require the fields in wp-admin
Iniciado por: andrewB-7
en: Toolset Professional Support
Problem: I would like to make some custom fields required in a CRED Form, but I would like to make the same fields optional when editing in wp-admin. Solution: add_filter( 'cred_form_validate', 'custom_story_validation', 10, 2 ); function custom_story_validation( $data, $form_data ) { $forms = array( 123, 456 ); if( in_array( $form_data['id'], $forms ) ){ list($fields,$errors)=$data; if (empty($fields['wpcf-email'])) { $errors['email'] = __('Email address is required', 'your-language-domain'); } if (empty($fields['wpcf-telephone'])) { $errors['telephone'] = __('Telephone is required', 'your-language-domain'); } if (empty($fields['wpcf-location'])) { $errors['location'] = __('Location is required', 'your-language-domain'); } $data =array($fields,$errors); } return $data; } Relevant Documentation: |
2 | 9 | hace 6 años, 6 meses | ||
Create post with automatic taxonomy term using CRED
Iniciado por: andrewB-7
en: Toolset Professional Support
Problem: I have 3 CRED forms that create new posts in the same post type. I would like to automatically assign one term to each new post, and I would like that term to be different for each form. I tried using the "value" attribute of the cred_field shortcode, but it does not appear to save the correct term information. Solution: The "value" attribute of a cred_field with single_select does not apply to taxonomy term fields. Instead, you can do something similar with the CRED API: add_action('cred_save_data', 'auto_cred_term_action',10,2); function auto_cred_term_action($post_id, $form_data) { // form #1 if ($form_data['id']==123) { $tag = array( 11 ); // Taxonomy term ID $taxonomy="storytypes"; // Taxonomy name wp_set_post_terms( $post_id, $tag, $taxonomy ); } // form #2 if ($form_data['id']==234) { $tag = array( 22 ); // Taxonomy term ID $taxonomy="storytypes"; // Taxonomy name wp_set_post_terms( $post_id, $tag, $taxonomy ); } // form #3 if ($form_data['id']==456) { $tag = array( 33 ); // Taxonomy term ID $taxonomy="storytypes"; // Taxonomy name wp_set_post_terms( $post_id, $tag, $taxonomy ); } } Remove the taxonomy cred_field shortcode from the form, and modify the form and term IDs as needed in the code above. Relevant Documentation: |
2 | 11 | hace 6 años, 7 meses | ||
Conversion of fields
Iniciado por: andrewB-7
en: Toolset Professional Support
Problem: Solution: You need to delete the WYSIWYG field and make a new multiline field. |
2 | 3 | hace 6 años, 7 meses | ||
Display of field on front end without WYSIWYG options
Iniciado por: andrewB-7
en: Toolset Professional Support
Problem: Solution: You can find proposed solution, in this case, with the following reply: Relevant Documentation: |
2 | 6 | hace 6 años, 7 meses | ||
Repeating field groups in CRED forms
Iniciado por: andrewB-7
en: Toolset Professional Support
Problem: Solution: |
2 | 8 | hace 6 años, 7 meses | ||
Remove Bootstrap toolbars from all Visual Editors
Iniciado por: andrewB-7
en: Toolset Professional Support
Problem: I would like to disable the Bootstrap toolbars from all Visual Editors on my site. Solution: Add the following code to functions.php: add_filter( 'mce_buttons_3', 'remove_bootstrap_buttons', 999 ); function remove_bootstrap_buttons($buttons) { return array(); } add_filter( 'mce_buttons', 'remove_bootstrap_toggle_button', 999 ); function remove_bootstrap_toggle_button($buttons) { $remove = array( 'css_components_toolbar_toggle' ); return array_diff( $buttons, $remove ); } |
2 | 4 | hace 6 años, 9 meses | ||
Unable to assign fields to post type
Iniciado por: andrewB-7 en: Toolset Professional Support |
2 | 5 | hace 6 años, 11 meses | ||
Order posts by custom date field
Iniciado por: andrewB-7 en: Toolset Professional Support |
2 | 2 | hace 6 años, 12 meses | ||
Displaying date field information in PHP template file
Iniciado por: andrewB-7
en: Toolset Professional Support
Problem: These need to be outputted separately in different places in the template. This is to allow me to display dates as in the attached screenshot. The field (if that helps) is called 'start-date-for-course' Solution: echo types_render_field( 'start-date-for-course', array( 'format'=>"M d") Relevant Documentation: |
2 | 3 | hace 6 años, 12 meses | ||
Properties of Text Area field
Iniciado por: andrewB-7 en: Toolset Professional Support |
2 | 10 | hace 7 años, 3 meses | ||
Category selection in CRED form
Iniciado por: andrewB-7 en: Toolset Professional Support |
2 | 10 | hace 7 años, 3 meses |