Lara
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 |
|---|---|---|---|---|---|
|
update ajax filter values with values from cred form
Iniciado por: Lara en: Toolset Professional Support |
|
2 | 10 | 3 years, 10 months ago | |
|
Use an AJAX View doesn't update on the fly, when he is nested in another view
Iniciado por: Lara en: Toolset Professional Support |
|
2 | 9 | 3 years, 11 months ago | |
|
Generic select field with "Get options from a shortcode" — disable options
Iniciado por: Lara en: Toolset Professional Support |
|
2 | 5 | 4 years, 2 months ago | |
|
Infinite scrolling
Iniciado por: Lara en: Toolset Professional Support |
|
2 | 5 | 4 years, 6 months ago | |
|
Save generic select field (the label and not the value) in another cred field
Iniciado por: Lara en: Toolset Professional Support |
|
2 | 5 | 4 years, 6 months ago | |
|
Nested view: Filter child and parent posts through URL_PARAM
Iniciado por: Lara en: Toolset Professional Support |
|
2 | 14 | 4 years, 7 months ago | |
|
Orderby two custom fields in the same View, with one custom field is >= TODAY()
Iniciado por: Lara
en: Toolset Professional Support
Problem: Use custom codes to setup date field filters. Solution: This is a custom codes problem, see the solution provided by client: Relevant Documentation: https://toolset.com/documentation/user-guides/views/date-filters/ |
|
2 | 4 | 4 years, 7 months ago | |
|
change post type after form submission
Iniciado por: Lara en: Toolset Professional Support |
|
2 | 6 | 4 years, 9 months ago | |
|
Access repeating field and insert it into a new posts
Iniciado por: Lara
en: Toolset Professional Support
Problem: I have a repeating custom field in a custom post type. When submitting a Form that creates this custom post type, I would like to create a cloned post that copies the values from the repeating custom field and inserts them automatically in the post clone. Solution: Use wp_insert_post in a cred_save_data hook to create a clone of the original post. Get the repeating field value from the $_POST superglobal, and loop over those values in a foreach loop, or other similar loop structure. Use add_post_meta to insert each value into the custom field in the cloned post.
add_action('cred_save_data', 'my_save_data_action',10,2);
function my_save_data_action($post_id, $form_data) {
$forms = array( 123 );
if ( in_array( $form_data['id'], $forms ) )
{
$gallery = $_POST['wpcf-fieldslug'];
$new_book_args = array(
'post_title' => 'cloned book test from ' . $post_id,
'post_status' => 'publish',
'post_type' => 'book'
);
// Insert the cloned post into the database
$new_book_id = wp_insert_post( $new_book_args );
foreach( $gallery as $img ){
add_post_meta($new_book_id, 'wpcf-fieldslug', $img, false);
}
}
}
Relevant Documentation: |
|
2 | 7 | 4 years, 9 months ago | |
|
Access custom checkboxes field $_POST['wpcf-slug'] as an array
Iniciado por: Lara en: Toolset Professional Support |
|
2 | 13 | 4 years, 9 months ago | |
|
Automatically check checkboxes when creating intermediary post (many-to-many relationship) programmatically using toolset_connect_posts
Iniciado por: Lara
en: Toolset Professional Support
Problem: I have a custom checkboxes group field applied to the intermediary post type in a M2M relationship. Some of the checkboxes in this group are configured to be "checked" automatically when new posts are created, but the intermediary post created automatically by the toolset_connect_posts API does not have these checkboxes checked automatically. Solution: Our developers are investigating this issue. Until it is addressed, an undocumented custom code workaround is required. |
|
2 | 14 | 4 years, 10 months ago |