CRED plugin provides an API, making it easy to customize your post or user forms. The API includes hooks (actions and filters) to accomplish specific tasks using PHP code.
When you ask for help or report issues, make sure to tell us all related information about your form and what you want to achieve.
Viewing 15 topics - 136 through 150 (of 355 total)
Problem: Posts created by Forms Commerce are not always published successfully. Some stay in Draft status, while others seem to be published immediately.
Solution: Be sure the Form is configured to create posts in Draft status, and to change the post status to Publish automatically when the Order is complete. If your payment processor does not automatically set the Order status to complete once payment is finalized, you may need a custom code snippet or another 3rd-party plugin to automatically complete the order, as Forms Commerce requires this status for effectively managing the post publishing flow.
Problem: I would like to send an automatic email notification to the Customer Email, but the placeholder does not seem to work in the recipient settings of my automatic notification.
Solution: Placeholders like %%CUSTOMER_EMAIL%% cannot be used outside of the subject and message areas of the automatic email notification. To send a notification to a specific email, you can insert an email custom field in the Form and choose that field as the recipient, or use a generic field to hold a User ID, or set up some custom implementation using the Forms API to programmatically select a recipient.
Problem: I have a Form that creates child posts. If the featured image is not provided in the child post Form, I would like to copy the featured image from the parent post into the featured image of the child post.
Solution: If the parent post is not predefined, then you must use the Forms API to copy the parent post's featured image into the child post's featured image since the parent post cannot be determined at the time the Form is loaded. Use the cred_submit_complete API to automate the process. In that callback you can use toolset_get_related_post or toolset_get_related_posts to query the parent post, then get_post_meta to fetch the featured image, then update_post_meta in the child post to set the featured image programmatically.
Problem: I have a Form where Users are asked to check off several sets of checkbox custom fields. I would like to calculate how many of each type of checkbox was checked, and display the total number of checked checkboxes of each type in the post template.
Solution: Use the cred_save_data API and the Types Field API to determine which checkboxes were checked and add up the totals for each type of checkbox. Save those totals in 4 new custom fields, and display the values of those custom fields in the post template.