jonB-5
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 Login page Display Issue After upgrade to Latest Plugins
1
2
Started by: jonB-5
in: Toolset Professional Support
Problem: The issue here is that the user's Layout is repeating for when they are logged out. Solution: In this case the user was using Layouts to control the header and footer of the pages. Nothing is wrong with this but they have duplicate elements on the pages that displays the menu area for logged out users. Removing these cells resolved this issue. |
2 | 18 | 6 years, 2 months ago | ||
Copy post taxonomy value to another taxonomy on cred save
1
2
Started by: jonB-5 in: Toolset Professional Support |
2 | 19 | 6 years, 3 months ago | ||
Unable to make CRED Generic Checkboxes Field Required
Started by: jonB-5 in: Toolset Professional Support |
2 | 4 | 6 years, 8 months ago | ||
Specifying which view an Incrementor Shortcode looks at
Started by: jonB-5
in: Toolset Professional Support
Problem: Solution: //Loop Counter add_shortcode('incrementor', 'incrementor'); function incrementor( $atts = [] ) { $atts = shortcode_atts( [ 'index' => 'i'], $atts ); static $indices = array(); if ( !isset( $indices[ $atts['index'] ] ) ) { $indices[ $atts['index'] ] = 0; } $indices[ $atts['index'] ] ++; return $indices[ $atts['index'] ]; } // in each View provide a different index, like so: [incrementor index="a"] |
2 | 4 | 6 years, 8 months ago | ||
Restrict CRED New User Username Character Types or Sanitzing Username on Save
Started by: jonB-5 in: Toolset Professional Support |
2 | 6 | 6 years, 9 months ago | ||
Copy Parent Post Field Value to Child Post Field on CRED New Child Post Save
Started by: jonB-5 in: Toolset Professional Support |
2 | 2 | 6 years, 9 months ago | ||
Issue Resetting View Filters When Page is Refreshed
Started by: jonB-5
in: Toolset Professional Support
Problem: I have set up custom JavaScript to conditionally hide, show and set filter options and values based on the option selected in another filter. In the first time landing on the page, everything works as expected, however, when I refresh the page manually the filters fields behave as expected (visually) but the results don't reset. Solution: when you have done the fist step: Select an option in the first filter and you'll see more filters appear and the search results change correctly The URL of your browser will be changed with some URL parameters, so when you refresh the page, it will display the filtered results. This is a feature of Views plugin, you can disable it by this: Relevant Documentation: |
2 | 6 | 6 years, 9 months ago | ||
Access CRED form Select field value during cred_save_data
Started by: jonB-5
in: Toolset Professional Support
Problem: When a user submits a CRED from, I need data within that form to either be deleted or saved depending on which option was chosen in a select field earlier in that same form. The select field is called voyage-or-excursion and the field values saved to the database are simply 1 or 2. If Option 1 is selected, I need the data in the field voyage-from-event to be deleted. I have tried a few variations of the below code but with no luck, it simply doesn't save anything to the field. Solution: How do you setup the select field "voyage-or-excursion", if it is a custom field created with Types plugin, you will need to add string "wpcf-" in the field slug, for example: To: Relevant Documentation: |
2 | 6 | 6 years, 9 months ago | ||
Help with existing thread
1
2
Started by: jonB-5 in: Toolset Professional Support |
2 | 17 | 6 years, 9 months ago | ||
Display a field in child post CRED Form only if parent post has specific value
Started by: jonB-5
in: Toolset Professional Support
Problem: |
2 | 8 | 6 years, 9 months ago | ||
Restrict Repeating Fields to “n” amount of instances
Started by: jonB-5
in: Toolset Professional Support
Problem: Solution: Relevant Documentation: |
2 | 3 | 6 years, 9 months ago | ||
How to Display and Apply Front-End Filters Conditionally based on Another Filter
Started by: jonB-5
in: Toolset Professional Support
Problem: When creating a Voyage (CPT), there is a Select field where a user specifies option 1 or option 2. Based on their selection they will then be given different fields for inputting voyage dates. Option 1 gives them a repeating field to enter multiple Start Date & Times and a 'voyage length' field to state how many hours long the voyage will be. Option 2 Gives them fields to enter a Start Date and an End Date for the voyage. My ideal situation would be a single archive page listing all results, where users have the option to filter to show only Option 1 results or only Option 2 results then set a Date Range in order to further filter the results. The problem is that the date fields are not the same for both Options. The solution I envisage is that the correct date filters will only display for the when and if the right option is selected. Solution: There isn't such a built-in feature within Views plugin, it needs custom JS codes. In your case, I suggest you reset the hidden field "wpv-wpcf-voyage-disembarkation-date" instead of the datepicker, the hidden field wpv-wpcf-voyage-disembarkation-date" will pass the URL parameter to the view, but the datepicker don't. For example, you can replace this line of your codes from: jQuery( '.wpv-date-front-end[data-param=wpv-wpcf-voyage-disembarkation-date]' ).datepicker( "setDate", null ); jQuery( 'input[name=wpv-wpcf-voyage-disembarkation-date]' ).val( null ); Relevant Documentation: |
2 | 8 | 6 years, 9 months ago | ||
Cannot output parent field in CRED child post using [cred-post-parent get=”id”]
Started by: jonB-5
in: Toolset Professional Support
Problem: I am trying to output the value of a parent post field within a new / edit child post CRED form using [cred-post-parent get="id"] as below, but I cannot get it to work. [types field='intro-line' id='[cred-post-parent get="id"]'][/types] I have found the following threads relating to this issue but cannot see a working solution, could you advise? Solution: 1) The child post type "Deck Events" has multiple parent post types, according to our document: If your CRED form is set to work with a child post type that has more than one parent, you must use the post_type attribute. Additionally, it is not possible to get parent information from multiple parents but only one. So you will need to setup the shortcode, like this: [cred_post_parent get='id' post_type='deck-event-overviews'] 2) And the shortcode [cred_post_parent] does not support shortcode within shortcode feature, you can try with another Views shortcode [wpv-search-term], for example, replace this line from: [types field="intro-line" id="[cred-post-parent get="id"]"][/types] To: [types field="intro-line" id="[wpv-search-term param="parent_deck-event-overviews_id"]"][/types] 3) in a single child post, you can get the parent post ID with Views shortcode: Relevant Documentation: https://toolset.com/documentation/user-guides/views-shortcodes/#vf-214940 |
3 | 13 | 6 years, 9 months ago | ||
Date Field Calculations + Changing User Role Based On User Custom Field Value
1
2
Started by: jonB-5 in: Toolset Professional Support |
2 | 21 | 6 years, 9 months ago | ||
Membership Site – Update Status of User Posts when User Role is Changed
Started by: jonB-5
in: Toolset Professional Support
Problem: I would like to programmatically change the post status of all posts by the current User in a PHP hook I have set up to handle User role changes. Solution: You can use the WordPress get_posts function to query all the author's posts, then update each of the posts as needed with wp_update_post. Here is a basic example: ... $user->set_role( 'tsn_bronze' ); // get all the published Voyage posts by the current user $args = array( 'post_type' => 'voyage', 'post_status' => 'publish', 'author' => $user_id, 'posts_per_page' => -1); $posts_array = get_posts($args); // loop over those posts and update each one to status "pending" foreach ($posts_array as $the_post) { $update_post = array( 'ID' => $the_post->ID, 'post_status' => 'pending' ); wp_update_post( $update_post ); } If you want to use the same code to update posts of more than one custom post type, modify the 'post_type' argument to use an array instead of a single string: $args = array( 'post_type' => array('voyage','deck-event'), Relevant Documentation: |
2 | 3 | 6 years, 9 months ago |