anarT
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Sending notification e-mail specified in a custom field
Started by: anarT in: Toolset Professional Support |
2 | 4 | 1 year ago | ||
Firefox scrolling problem with “This field is required” fields (Form)
Started by: anarT
in: Toolset Professional Support
Problem: When a required field is not filled in my Form upon submission, the browser scrolls to the top of the page but the field is hidden by a fixed header. Solution: Add some CSS to influence the top scroll position of the document: html { scroll-padding-top: 150px; } |
2 | 3 | 4 years ago | ||
Send notification to recipient email defined in parent post custom field
Started by: anarT
in: Toolset Professional Support
Problem: I have a Form that creates child posts. When the child post is published, I would like to send an automatic email notification to an email address specified in the parent post's custom fields, but I cannot specify that field in the notification settings. Solution: You can use some custom PHP code with the cred_notification_recipients API and the toolset_get_related_post API to query the parent post, get the custom field value, and add that email address to the recipients list programmatically: 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']) && 'your-notification-name' == $notification['name'] ) { // Add email recipient $parent_id = toolset_get_related_post( $post_id, 'your-relationship-slug' ); $emailemailangehorige = get_post_meta($parent_id, 'wpcf-your-email-field-slug', true); $recipients[] = array( 'to' => 'to', 'address' => $emailemailangehorige, 'name' => '', 'lastname' => ''); } return $recipients; } Relevant Documentation: |
2 | 12 | 4 years ago | ||
Images conflict
Started by: anarT in: Toolset Professional Support |
2 | 13 | 5 years, 1 month ago |