rithvikU
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 |
---|---|---|---|---|---|
Content template not working for post type with rewritten permalinks
Started by: rithvikU in: Toolset Professional Support |
2 | 16 | 1 year, 10 months ago | ||
Adding OTP (One Time Password) Verification to Forms
Started by: rithvikU in: Toolset Professional Support |
2 | 2 | 2 years, 2 months ago | ||
View Custom Parametric Search for Post Status
Started by: rithvikU
in: Toolset Professional Support
Problem: I would like to create a parametric search View that allows users to filter a list of posts by post status, using a dropdown select filter. Solution: It is not currently possible to create front-end filters for post status. Other workarounds proposed in the past have limitations that are not easily overcome with custom code. Instead, the most practical approach is to create a custom select field that includes values corresponding to each possible post status. Copy the actual post status information into the value of this custom field for each post, and set up a parametric search View that filters upon this custom field. In this case the posts are created in Forms, and a generic select field is used to allow the User to choose a post status for the created post. There is a custom code snippet using the cred_submit_complete API to programmatically set the post status after the Form is submitted. We can tap into that event hook to also set the custom field value programmatically with update_post_meta: add_action('cred_submit_complete', 'my_save_draft',10,2); function my_save_draft($post_id, $form_data) { // if a specific form if ($form_data['id'] = array(737,521)) { if (isset($_POST['post_stat'])) { // update post status $my_post = array( 'ID' => $post_id, 'post_status' => $_POST['post_stat'], ); wp_update_post($my_post); // add / update post-status custom field value update_post_meta( $post_id, 'wpcf-post-status', $_POST['post_stat']); } } } Relevant Documentation: |
2 | 7 | 3 years, 10 months ago | ||
Dynamic value of bookmark form submit button based on bookmark status
Started by: rithvikU in: Toolset Professional Support |
2 | 9 | 3 years, 11 months ago | ||
Limiting the CSS I add in the CRED forms CSS Editor to just that form
Started by: rithvikU in: Toolset Professional Support |
1 | 2 | 3 years, 12 months ago | ||
Save value of user form generic field to custom user field
Started by: rithvikU
in: Toolset Professional Support
Problem: Save Toolset Forms Generic field value into database. Solution: After user submit the form, you can get the field "avatar-select" value with PHP variable $_POST['avatar-select'], then save it into database, for example: Relevant Documentation: https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data |
2 | 5 | 4 years ago |