leilaG
In den letzten 30 Tagen erstellte Support-Threads: 0
Lieblings-Forenthemen
This user has no favorite topics.
Forum Topics Created
Status | Thema | Supporter | Stimmen | Artikel | Aktualität |
---|---|---|---|---|---|
Multiple form ID’s in the same cred_save_data function
Gestartet von: leilaG
in: Toolset Professional Support
Problem: I have a CRED hook that is used only for specific form IDs. I would like to add some more form IDs to the list, but I'm not sure how the code should be written. Solution: Modify the code so that the form IDs are managed in a comma-separated list, and check to see if the current form ID is in that list: function tssupp_false_body( $post_id, $form_data ){ $forms = array( 17097,170998 ); if ( in_array($form_data['id'], $forms) ){ $false_body = $_POST['Description']; if ( $false_body ) { $args = array( 'ID' => $post_id, 'post_content' => $false_body ); wp_update_post( $args ); } } } add_action( 'cred_save_data', 'tssupp_false_body', 10, 2 ); Relevant Documentation: |
2 | 7 | vor 6 Jahren, 7 Monaten | ||
Front-end submission force select a taxonomy
Gestartet von: leilaG
in: Toolset Professional Support
Problem: I would like to automatically assign a specific taxonomy term to posts created by a CRED Form. Solution: Add the following code to your child theme's functions.php file: add_action('cred_save_data', 'auto_cred_term_action',10,2); function auto_cred_term_action($post_id, $form_data) { // news posts if ($form_data['id']==123) { $tag = array( 149 ); // Taxonomy term ID $taxonomy="category"; // Taxonomy name wp_set_post_terms( $post_id, $tag, $taxonomy ); } } Replace 123 with the numeric ID of the CRED form, then remove the taxonomy cred_field shortcode from the CRED form builder. Relevant Documentation: |
2 | 5 | vor 6 Jahren, 7 Monaten | ||
Adding headers/titles to table of results
Gestartet von: leilaG
in: Toolset Professional Support
Problem: Solution: You can find proposed solution, in this case, with the following reply: Relevant Documentation: |
2 | 3 | vor 6 Jahren, 7 Monaten | ||
Post expiration date
Gestartet von: leilaG
in: Toolset Professional Support
Problem: I would like to use the post expiration date feature in wp-admin, and I would like to display the post's expiration date on the front-end of the site. Solution: Go to Toolset > Settings > Forms and choose "Enable automatic expiration of Post options for Post Forms" to activate post expiration features in wp-admin. Then to display the post expiration date on the front-end of the site, you can use the following shortcode: [cred-post-expiration id="[wpv-post-id]" format="m/d/Y"] |
3 | 5 | vor 6 Jahren, 7 Monaten | ||
Building a membership section and user registration
Gestartet von: leilaG in: Toolset Professional Support |
2 | 3 | vor 6 Jahren, 7 Monaten | ||
Using the same function for numerous forms
Gestartet von: leilaG
in: Toolset Professional Support
Problem: Solution: |
2 | 7 | vor 6 Jahren, 7 Monaten | ||
How to make taxonomies required fields
Gestartet von: leilaG in: Toolset Professional Support |
2 | 7 | vor 6 Jahren, 7 Monaten | ||
How to set the Sender email to the email of an custom generic email field
Gestartet von: leilaG
in: Toolset Professional Support
Problem: I have a CRED form that captures name and email address using generic fields. I would like to set the "From" email address using these generic field values. Solution: There is no easy way to do this in the wp-admin area, so just leave the sender information fields empty. To manipulate the sender's email address, you must use the CRED API to modify the email headers: function customise_cred_notifications( $headers, $formid, $postid, $notification_name, $notification_number ) { if( $formid == 12345 ) { $sender_email = $_REQUEST['sender-email-field-slug']; $sender_name = $_REQUEST['sender-name-field-slug']; $myheaders = array( "From: " . $sender_name . " <" . $sender_email . ">" ); return array_merge($headers, $myheaders); } return $headers; } add_filter('cred_mail_header', 'customise_cred_notifications', 10, 5); Replace 12345 with the ID of your form, and replace sender-email-field-slug and sender-name-field-slug with the proper slugs from your generic fields. Relevant Documentation: |
2 | 7 | vor 6 Jahren, 7 Monaten | ||
How to change Rich text editor (WYSIWYG) to a plain text editor
Gestartet von: leilaG
in: Toolset Professional Support
Problem: Solution: function tssupp_false_body( $post_id, $form_data ){ if ( $form_data['id'] == 99 ) { // Edit $false_body = $_POST['false-body']; if ( $false_body ) { $args = array( 'ID' => $post_id, 'post_content' => $false_body ); wp_update_post( $args ); } } } add_action( 'cred_save_data', 'tssupp_false_body', 10, 2 ); |
2 | 10 | vor 6 Jahren, 8 Monaten | ||
Layout plugin clash with events plugin Eventon
Gestartet von: leilaG in: Toolset Professional Support |
2 | 3 | vor 6 Jahren, 8 Monaten | ||
Include custom generic fields in notification email
Gestartet von: leilaG
in: Toolset Professional Support
Problem: I would like to include generic field values in an email notification sent by a CRED form, but the API code produces a 500 server error. Solution: Do not add the callback function multiple times to add multiple placeholders. Instead, add all the placeholders at once in a single function. add_filter('cred_subject_notification_codes', 'custom_generic_field_notification', 10, 1); add_filter('cred_body_notification_codes', 'custom_generic_field_notification', 10, 1); function custom_generic_field_notification( $defaultPlaceHolders ) { $newPlaceHolders = array( '%%Name%%' => $_REQUEST['Name'], '%%Email%%' => $_REQUEST['Email'] ); return array_merge($defaultPlaceHolders, $newPlaceHolders ); } Relevant Documentation: |
2 | 3 | vor 6 Jahren, 8 Monaten | ||
Cred form submissions and Notifications
Gestartet von: leilaG in: Toolset Professional Support |
2 | 3 | vor 6 Jahren, 8 Monaten | ||
Layout plugin clash with events plugin Eventon
Gestartet von: leilaG in: Toolset Professional Support |
2 | 6 | vor 6 Jahren, 8 Monaten | ||
Qode Slider conflict with Bootstrap on parallax site
Gestartet von: leilaG
in: Toolset Professional Support
Problem: I am using a Qode Slider on a parallax-style site to display an image gallery. When I scroll past the gallery, I see blank space beneath it with Toolset active. Solution: This conflict is between Bootstrap and Qode Sliders. Both use the CSS class "carousel", and the positioning styles clash. The two options are: .q_slider_inner .carousel-inner { position: fixed; } |
2 | 3 | vor 7 Jahren | ||
Side and Page titles
Gestartet von: leilaG in: Toolset Professional Support |
2 | 4 | vor 7 Jahren, 1 Monat |