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.
A user asked if there is an option to change the email address recipient in the form notification when a specific option in the form field is selected.
Solution:
Guided that it is possible to change the recipient(s) of a form notification, using the "cred_notification_recipients" filter.
Problem:
The customer reported that the custom code linked to the 'cred_save_data' hook is not working correctly to get the custom field values from the related parent post and set them in the newly created post's title.
Also, the shortcode to include the custom field values from the related parent post in the form's email notification is also not working.
Solution:
After troubleshooting, suggested some changes in the custom function and the shortcodes for the related parent's custom field values.
Problem:
The customer reported that the code to set the post-expiration date/time through the 'cred_save_data' hook is not working as expected.
Solution:
Tested the customer's code and it worked as expected on a test website.
Guided that when using the custom function to set the expiration date/time, please make sure that the option 'Set expiration date for post created or edited by this form' is unchecked in the form's settings.
If you've set some post-expiration date/time through the form settings, it will override the date/time set by the custom function.