marcoR-6
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 |
---|---|---|---|---|---|
CRED Delete Post Link inside a CRED Form
Gestartet von: marcoR-6 in: Toolset Professional Support |
2 | 7 | vor 7 Jahren, 3 Monaten | ||
Image instead value on CRED submit and CRED delete
Gestartet von: marcoR-6
in: Toolset Professional Support
Problem: Solution: 1. First, please add your own custom css class like below, you can add that in your theme’s style.css file or CRED >> CSS editor section. For Save: .btn-submit-save { background: rgba(0, 0, 0, 0) url("https://cdn4.iconfinder.com/data/icons/lingo/Add%20button.png") no-repeat scroll 0 0 !important; font-size: 0 !important; height: 32px !important; width: 32px !important; } - Please replace above image URL with yours. 2. Then add the class in CRED field submit button shortcode like this (btn-submit-save): [cred_field field='form_submit' value='Save' urlparam='' class='btn btn-primary btn-lg btn-submit-save' output='bootstrap'] You can do same for the Delete button, just use a unique class name for it, like btn-submit-delete. |
2 | 3 | vor 7 Jahren, 3 Monaten | ||
Get new and previous value before save data
Gestartet von: marcoR-6
in: Toolset Professional Support
Problem: Solution: add_action('cred_before_save_data', 'my_before_save_data_action',10,1); function my_before_save_data_action($form_data) { // if a specific form if ($form_data['id']==3780) { if (isset($_POST['_cred_cred_prefix_post_id'])) { $current_post_id = $_POST['_cred_cred_prefix_post_id']; // post id $field_old_value = get_post_meta( $current_post_id, 'wpcf-resolved-by', true ); // 'wpcf-resolved-by' Custom Field Slug $field_new_value = $_POST['wpcf-resolved-by']; // 'wpcf-resolved-by' Custom Field Slug echo 'Old Value '.$field_old_value ."<br>"; echo 'New Value '.$field_new_value ."<br>"; $args = array( 'post_type' => 'student', // CPT slug 'posts_per_page' => -1, // All Posts ); $the_query = new WP_Query( $args ); // The Loop if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); if( get_the_ID() == $current_post_id ) // Ignore Current Edit post continue; $key_1_value = update_post_meta( get_the_ID(), 'wpcf-resolved-by', $field_new_value ); // // 'wpcf-resolved-by' Custom Field Slug endwhile; endif; // Reset Post Data wp_reset_postdata(); } }} ==> Please note the comments in the above code and replace your CRED form ID, Custom field slug, CPT slug, etc where needed. Relevant Documentation: |
2 | 3 | vor 7 Jahren, 3 Monaten | ||
Change sender in email notification after submit post
Gestartet von: marcoR-6
in: Toolset Professional Support
Problem: Solution: Relevant Documentation: |
2 | 5 | vor 7 Jahren, 3 Monaten | ||
Send notification after submit cred to a E-mail specified in a field
Gestartet von: marcoR-6
in: Toolset Professional Support
Problem: The customer in this ticket created a Generic CRED email field to send their notifications to. However this field did not show up in the notification settings. Solution: The issue is that the value must be set to save to the database. |
2 | 3 | vor 7 Jahren, 3 Monaten | ||
Modify draft posts by CRED form on front-end
Gestartet von: marcoR-6 in: Types Community Support |
2 | 2 | vor 7 Jahren, 5 Monaten |