|
In many to many relationship [cred_post_parent get=’id’] is not working properly
Started by: Khurram
in: Toolset Professional Support
Quick solution available
Problem:
I have many to many relationships Events-->session<--Members where session is child of both Event and Member post type. Everything is working fine except this:
[cred_post_parent get='id']
[cred_post_parent get='title']
[cred_post_parent get='url']
Solution:
If there are multiple parents for a Custom post type (many-to-many), in the cred form we need to add 'post_type' attribute in the shortcodes, for example:
ID: [cred_post_parent get='id' post_type='event'] <br />
Title: [cred_post_parent get='title' post_type='event'] <br />
URL: [cred_post_parent get='url' post_type='event']
Whereas 'event' is the parent's custom post type slug.
Relevant Documentation:
https://toolset.com/documentation/user-guides/cred-forms-for-child-content/
|
|
2 |
11 |
7 years, 3 months ago
Khurram
|
|
CRED not getting postID in generic field, default value with view shortcode
Started by: tinaH
in: Toolset Professional Support
|
|
3 |
14 |
7 years, 3 months ago
Beda
|
|
Redirect after submit a forms
Started by: charlesR-5
in: Toolset Professional Support
|
|
2 |
5 |
7 years, 4 months ago
charlesR-5
|
|
Missing texts for translation in CRED forms
Started by: toolset-dave
in: Toolset Professional Support
|
|
2 |
6 |
7 years, 4 months ago
toolset-dave
|
|
How to create a form with repeating fields groups using CRED
Started by: charlesR-5
in: Toolset Professional Support
|
|
2 |
5 |
7 years, 4 months ago
charlesR-5
|
|
Form to edit specific child post – complicated.
Started by: Garet
in: Toolset Professional Support
|
|
2 |
4 |
7 years, 4 months ago
Christian Cox
|
|
Parent fields are not showing up
Started by: mainemissingpersons
in: Toolset Professional Support
|
|
2 |
2 |
7 years, 4 months ago
Luo Yang
|
|
Select multiple parents of same post type in many to many relation
Started by: Khurram
in: Toolset Professional Support
|
|
2 |
4 |
7 years, 4 months ago
Noman
|
|
Hiding pages from logged-in users
Started by: Charles
in: Toolset Professional Support
|
|
2 |
4 |
7 years, 4 months ago
Luo Yang
|
|
“— not set —” from Parent dropdown still displaying
Started by: toolset-dave
in: Toolset Professional Support
Quick solution available
Problem:
On a CRED form for a child post, the Select dropdown for the parent post shows an empty "--not set--" option when we make the field required.
Solution:
As of today, this is a bug in Toolset CRED v1.9.0.1 and is reported to be fixed. In the meantime, please use this jQuery workaround. Add the below JS code in your CRED Edit Form >> JS editor section:
( function( $ ) {
$( document ).ready( function(){
$('select[name*="post_parent"] option:contains("--- not set ---")').remove();
});
})( jQuery );
|
|
2 |
4 |
7 years, 4 months ago
toolset-dave
|
|
Pass on a value from a parent post to a child post in CRED
Started by: Michael van der Steen
in: Toolset Professional Support
Quick solution available
Problem: I would like to create a link from a View of parent posts to a CRED form that creates child posts. The parent post should be automatically selected in the CRED form when the user clicks the child post link.
Solution: CRED offers a child post shortcode that can be placed in a View of parent posts that will automate this process.
[cred_child_link_form form='506' parent_id='-1' target='_self']
You can place this shortcode in a Content Template or directly into your View's Loop Output editor. If you want to place this code in a Content Template that is constructed with Beaver Builder, then you cannot use a button module. You should use an HTML module.
Relevant Documentation: https://toolset.com/documentation/user-guides/cred-forms-for-child-content/
https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/
|
|
2 |
18 |
7 years, 4 months ago
Christian Cox
|
|
Looking for advice on how to structure post types/user types to achieve my goal.
Started by: carlosB-2
in: Toolset Professional Support
|
|
2 |
5 |
7 years, 4 months ago
carlosB-2
|
|
User post cred does not show keep radio option selected in wpadmin
Started by: williamM-3
in: Toolset Professional Support
Quick solution available
|
|
2 |
18 |
7 years, 4 months ago
williamM-3
|
|
Need to save input from a field to custom taxonomy
Started by: Wajiha Salman
in: Toolset Professional Support
Quick solution available
Problem: A taxonomy field does not display in my CRED form.
Solution: Ensure there are no conflicting form elements. In this case, a taxonomy 'state' was used along with a custom field 'state', which led to unexpected results. Modifying the custom field to use a different slug, 'state-txt', was the solution.
Relevant Documentation: https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field
|
|
2 |
14 |
7 years, 4 months ago
Wajiha Salman
|
|
Displaying data from a Parent post on a CRED form that creates a Child post
Started by: Michael van der Steen
in: Toolset Professional Support
Quick solution available
Problem:
How to display data or field from a Parent post on a CRED form that creates a Child post? I want to add a specific field from the parent post which is a Date field.
Solution:
1. Please add following code in your theme’s or child theme’s functions.php file:
add_shortcode('cred_parent_field', 'cred_parent_field_func');
function cred_parent_field_func($atts)
{
extract( shortcode_atts( array(
'id'=>null,
'field' => null,
'format' => null
), $atts ) );
$parent_id=null;
if ( isset($_GET['parent_'.$id.'_id']) )
{
$parent_id=intval($_GET['parent_'.$id.'_id']);
}
return do_shortcode( '[types field="' . $field .'" format="'. $format . '" id="'. $parent_id . '"][/types]');
}
2. Add this shortcode in your child post form:
[cred_parent_field field="assigned-hours" format="FIELD_NAME: FIELD_VALUE" id="program"]
In above shortcode:
==> Replace field="assigned-hours" with your field name
==> Replace id="program" with your Parent CPT slug
==> For Date field format, you can change format value as: format="m-d-Y"
|
|
2 |
4 |
7 years, 4 months ago
Noman
|