CRED Repeatable nested fields
Started by: Sammut
in: Toolset Professional Support
2
2
6 years ago
Waqar
Unable to select parent when creating a child post
Started by: Greig Neilson
in: Toolset Professional Support
2
17
6 years ago
Beda
Building a database inside WordPress
Started by: jeremyA-4
in: Toolset Professional Support
2
9
6 years, 1 month ago
Shane
Login Logout Menu links and Redirection
Started by: WayneH4064
in: Toolset Professional Support
Quick solution available
2
13
6 years, 1 month ago
WayneH4064
I can only create 7 child posts
Started by: Rita
in: Toolset Professional Support
2
3
6 years, 1 month ago
Rita
A better media uploader
Started by: mayurJ
in: Toolset Professional Support
2
2
6 years, 1 month ago
Minesh
Post not displaying correctly
Started by: LisaA1200
in: Toolset Professional Support
Quick solution available
2
3
6 years, 1 month ago
LisaA1200
Relationship Fields are not being stored as WP Custom Fields.
Started by: Mukesh
in: Toolset Professional Support
2
5
6 years, 1 month ago
Mukesh
Function that Christian helped me with 2 years ago
Started by: Steve
in: Toolset Professional Support
2
8
6 years, 1 month ago
Steve
Toolset forms many to many
Started by: davidR-12
in: Toolset Professional Support
2
5
6 years, 1 month ago
Christian Cox
cred_notification_recipients using parent post email field
Started by: katjaL
in: Toolset Professional Support
Quick solution available
Problem: I have a Form that creates child posts. I would like to use automatic email notifications to send a message to an email address field in the parent post, but I can't get the cred_notification_recipients API to use the correct email address.
Solution: Use the post relationships API and get_post_meta to access the parent post email address field:
add_filter('cred_notification_recipients', 'modify_recipients', 10, 4);
function modify_recipients($recipients, $notification, $form_id, $post_id) {
// Check notification name matches target notification
if ( isset($notification['name']) && 'Www-opiskelijahaku' == $notification['name'] ) {
// Add email recipient
$parent_id = toolset_get_related_post(
$post_id,
'opiskelijan-harjoittelupaikka-hakija'
);
$emailpalautusosoite = get_post_meta($parent_id, 'wpcf-palautusosoite', true);
$recipients[] = array(
'to' => 'to',
'address' => $emailpalautusosoite,
'name' => '',
'lastname' => '');
}
return $recipients;
}
Relevant Documentation:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_notification_recipients
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_get_related_post
https://developer.wordpress.org/reference/functions/get_post_meta/
2
9
6 years, 1 month ago
katjaL
Past parent post title to CRED form
Started by: deanL
in: Toolset Professional Support
Quick solution available
Problem:
The issue here is that the user has a button on their parent post that can be used to navigate to the child post. This button is passing the url to the child page.
Solution:
In this case we can just use the shortcode.
[wpv-post-title id="[wpv-search-term param='parent_post_id']"]
Now this will only work if the parent id is being passed in the url
2
10
6 years, 1 month ago
Shane
Conflict between Registration Form redirect and Custom Redirect
Started by: WayneH4064
in: Toolset Professional Support
Quick solution available
Problem:
The issue here is that the user wanted to redirect to a page after the form is submitted.
Solution:
The correct code example to do this can be seen below.
add_filter('cred_success_redirect', 'custom_room_edit_redirect',10,3);
function custom_room_edit_redirect($url, $post_id, $form_data)
{
if ($form_data['id']==207199){
$url = toolset_get_related_post($post_id, array( 'bb', 'add-room-field' ));
$url = get_permalink($bb_post);
}
return $url ;
}
For more information on this hook take a look at our document here.
https://toolset.com/documentation/programmer-reference/cred-api/#cred_success_redirect
2
3
6 years, 1 month ago
WayneH4064
Create a form to be sent to another user/subscriber
Started by: simonR-7
in: Toolset Professional Support
2
10
6 years, 1 month ago
simonR-7
Classified Ad Overwritten
Started by: kalmang
in: Toolset Professional Support
2
8
6 years, 1 month ago
Shane