julieP
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 |
---|---|---|---|---|---|
CRED Edit Post Links In A View Disappear When Post Status is Draft or Pending
1
2
Started by: julieP in: Toolset Professional Support |
4 | 17 | 7 years, 2 months ago | ||
Multi Site: Display Content on Site #1 Based on User’s Role on Site #3
Started by: julieP
in: Toolset Professional Support
Problem: In site A of a multisite installation, I would like to create a conditional that will test the current User's role in site B. Solution: Create a custom shortcode that will allow you to access user information in a specific site on your network. Relevant Documentation: https://wordpress.stackexchange.com/questions/163262/how-to-get-a-user-role-of-a-specific-blog-in-multisite |
2 | 5 | 7 years, 2 months ago | ||
Reset or Clear Button for Fields on CRED Edit Form?
Started by: julieP
in: Toolset Professional Support
Problem: Solution: jQuery(document).ready(function( $ ){ jQuery('#reset_select').on('click',function(e){ jQuery(this).parent('.form-group').find("option:selected").removeAttr("selected"); }); }); 2. Then use the below code in your CRED form, Reset button for the field, please replace field=’status’ with your field name and post=’book’ with your Custom Post Type: <div class="form-group"> <label>Field Name</label> [cred_field field='status' post='book' value='' urlparam='' class='form-control' output='bootstrap'] <button type="button" id="reset_select" value="Reset">Reset</button> </div> |
2 | 6 | 7 years, 3 months ago | ||
CRED Save Data Hook Not Updating Custom Field
Started by: julieP in: Toolset Professional Support |
2 | 3 | 7 years, 3 months ago | ||
Conditional Display Based on Custom User Field
Started by: julieP
in: Toolset Professional Support
Problem: Solution: You can find the proposed solution with the reply at here Relevant Documentation: |
2 | 3 | 7 years, 3 months ago | ||
Clarification Please re CRED Email Notification ‘Set from details’
1
2
Started by: julieP
in: Toolset Professional Support
Problem: When I send email using an SMTP plugin or by forcing SMTP with PHP code, the "from" address settings applied in a CRED notification are not applied to the outgoing email. Solution: CRED is not able to override the settings of an SMTP plugin or custom SMTP integration with code. If you're using a Gmail account "from" address, you must provide SMTP login credentials for that Gmail account or another Gmail account connected in your profile. Other SMTP servers will only allow you to send from one address. It's not possible to make the SMTP credentials variable, unless otherwise specified by your SMTP system. |
2 | 20 | 7 years, 3 months ago | ||
Change CP Author on Frontend
Started by: julieP
in: Toolset Professional Support
Problem: I would like to use a CRED generic field to display users, and modify the author of the created post to match the selected user. Solution: Using a View to create options for a generic field is not a supported feature of Views. The steps other users have had luck with are described below, but not guaranteed to work. Create a View of all Users: [wpv-layout-start] [wpv-items-found] <!-- wpv-loop-start --> <wpv-loop> [wpv-item index=1] {"value":"[wpv-user field="ID"]","label":"[wpv-user field="display_name"]"} [wpv-item index=other], {"value":"[wpv-user field="ID"]","label":"[wpv-user field="display_name"]"} </wpv-loop> <!-- wpv-loop-end --> [/wpv-items-found] [wpv-layout-end] Add code to functions.php which will strip extra formatting from the authors View: add_filter( 'wpv_filter_wpv_view_shortcode_output', 'prefix_clean_view_output', 5, 2 ); function prefix_clean_view_output( $out, $id ) { if ( $id == '131' ) { //Please adjust to your Views ID $start = strpos( $out, '<!-- wpv-loop-start -->' ); if ( $start !== false && strrpos( $out, '<!-- wpv-loop-end -->', $start ) !== false ) { $start = $start + strlen( '<!-- wpv-loop-start -->' ); $out = substr( $out , $start ); $end = strrpos( $out, '<!-- wpv-loop-end -->' ); $out = substr( $out, 0, $end ); } else { $start = strpos( $out, '>' ); if ( $start !== false) { $out = substr( $out, $start + 1 ); $end = strpos( $out, '<' ); $out = trim(substr( $out, 0, $end )); } } } return $out; } Create a CRED generic field and place the authors View in the options attribute: [cred_generic_field field='change_post_author' type='select' class='' urlparam=''] { "required":0, "validate_format":0, "default":[], "options":[ [wpv-view name="All Authors"] ] } [/cred_generic_field] Add cred_save_data hook to functions.php: add_action('cred_save_data', 'my_save_data_action',10,2); function my_save_data_action($post_id, $form_data) { // if a specific form if ($form_data['id']==131) { $my_post = array( 'ID' => $post_id, 'post_author' => $_POST['change_post_author'] ); // Update the post in the database wp_update_post( $my_post ); } } |
2 | 3 | 7 years, 3 months ago | ||
Bootstrap Tooltip and Popover
Started by: julieP
in: Toolset Professional Support
Problem: Solution: jQuery(document).ready(function( $ ){ $('[data-toggle="tooltip"]').tooltip() }); Screenshot here: https://d7j863fr5jhrr.cloudfront.net/wp-content/uploads/2017/07/549990-jQuery.png?x71388 |
2 | 3 | 7 years, 3 months ago | ||
Create Favourites List from Search Results?
Started by: julieP
in: Toolset Professional Support
Problem: Solution: |
2 | 3 | 7 years, 4 months ago | ||
Redirection to Primary Site on Multi Site Install
1
2
Started by: julieP in: Toolset Professional Support |
2 | 22 | 7 years, 4 months ago | ||
Views & Performance – Which Approach Is Best Please?
Started by: julieP in: Toolset Professional Support |
2 | 3 | 7 years, 4 months ago | ||
Custom Field Values Not Updating
Started by: julieP
in: Toolset Professional Support
Problem: I have several input fields in a CRED form that are shown or hidden based on the value of another input field. If some fields are hidden, I would like to delete those custom field values. Solution: Use the cred_save_data hook to delete custom values based on their index. In order for this to work, your fields must be named in a format that is consistent. add_action('cred_save_data', 'daycare_create_save_data',10,2); function daycare_create_save_data($post_id, $form_data) { // if this is the create daycare form, delete any unnecessary metas // for instance, if user lowers number of days after adding metas if ($form_data['id']==5 || $form_data['id']==6) { $number = $_POST['wpcf-number']; if($number) { // loop through all metas in reverse order and delete extras by day for($i=7; $i>$number; $i--) { delete_post_meta($post_id, 'wpcf-day-' . $i); delete_post_meta($post_id, 'wpcf-day-' . $i . '-start-hour'); delete_post_meta($post_id, 'wpcf-day-' . $i . '-start-min'); delete_post_meta($post_id, 'wpcf-day-' . $i . '-end-hour'); delete_post_meta($post_id, 'wpcf-day-' . $i . '-end-min'); } } } } Relevant Documentation: https://toolset.com/documentation/programmer-reference/cred-api/#csd |
2 | 11 | 7 years, 4 months ago | ||
Struggling to Implement CRED Form Message
Started by: julieP
in: Toolset Professional Support
Problem: Solution: This needs to go into the template that displays the TARGET of the CRED form. Where you want do display success message (post/page/view etc). It will ONLY work if either of the following redirect is selected in Toolset > CRED > Post Forms > Edit (your_edit_form) > Settings > After visitors submit this form: - Keep displaying this Form Relevant Documentation: |
2 | 11 | 7 years, 4 months ago | ||
CRED edit-post link (V1.9) Doesn’t Show on Frontend
Started by: julieP
in: Toolset Professional Support
Problem: Solution: Relevant Documentation: |
3 | 14 | 7 years, 4 months ago | ||
Empty Folders (Access 2.4)
Started by: julieP in: Toolset Professional Support |
2 | 3 | 7 years, 5 months ago |