AndreG3332
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 |
---|---|---|---|---|---|
Display parent details as part of child post and open cred form when clicked
Started by: AndreG3332
in: Toolset Professional Support
Problem: I would like to display information from two different grandparent post types on a parent post. I would also like to create a Form that creates child posts, and insert a link to that Form on the parent post so that the parent is automatically selected. Solution: Create a View of Requirement CPTs. In the Loop, you can insert the post title shortcode to display the related Company name. Click "Fields and Views", then "Post title", and you will be shown a popup. Click the "Post Selection" tab, then choose "A post related to the current post, set by a Types relationship". Next, select the Company post in your Company > Requirement post relationship. Create the new Submission Post Form and insert it in a custom Page. Then return to the View of Requirements editor and use the Toolset Forms button above the Loop Editor to insert a "Create Child Post Link". Select the Page containing the Submission Post Form, and a link will be automatically inserted for you. When Users click the link, they will be directed to the Page containing the new Submission Form. If you want to hide the parent select field in the Form, you can use CSS in the Form editor. <div style="display:none;"> [cred_field field="@relationship-slug.parent" class="form-control" output="bootstrap" select_text="--- not set ---"] </div> Relevant Documentation: |
2 | 4 | 6 years, 2 months ago | ||
Bulk editing of details
Started by: AndreG3332 in: Toolset Professional Support |
2 | 3 | 6 years, 2 months ago | ||
Set a child post title from parent post titles with code
Started by: AndreG3332
in: Toolset Professional Support
Problem: I have a Form that creates posts and allows the User to choose two post parents from other post types. I would like to use the Forms API to automatically set the child post title to include the title of both parent posts. Solution: add_action('cred_save_data', 'your_save_data_action',10,2); function your_save_data_action($post_id, $form_data) { // if a specific form if ($form_data['id']==138) { $docyear = get_post_meta($post_id, 'wpcf-year', true); $custname = isset($_POST['@customer-requirement_parent']) ? get_the_title($_POST['@customer-requirement_parent']) : ''; $docname = isset($_POST['@document-master-list-requirement_parent']) ? get_the_title($_POST['@document-master-list-requirement_parent']) : ''; $drdetail= $docyear. ' - ' . $custname. ' - ' . $docname; $args = array('ID' => $post_id, 'post_title' => $drdetail); wp_update_post($args); } } Relevant Documentation: https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data |
2 | 3 | 6 years, 2 months ago | ||
Can you setup relationship fields with a user?
Started by: AndreG3332 in: Toolset Professional Support |
2 | 3 | 6 years, 2 months ago | ||
Set post title with fields from CPT Not working
Started by: AndreG3332 in: Toolset Professional Support |
2 | 2 | 6 years, 2 months ago | ||
Data validation on input forms
Started by: AndreG3332 in: Toolset Professional Support |
2 | 2 | 6 years, 2 months ago | ||
How to setup a front end form with a parent and two child posts
Started by: AndreG3332 in: Toolset Professional Support |
2 | 4 | 6 years, 2 months ago | ||
Auto population of table
Started by: AndreG3332 in: Toolset Professional Support |
2 | 8 | 6 years, 2 months ago |