Problem: I have a Form that is placed on a custom post. The custom post has a custom field that holds an email address. I would like to use that email address as the destination of a Form notification email.
Solution: You can use a hidden generic field in the Form to capture the email address from the post, which is the same as the current page:
<div style="display:none;"> [cred_generic_field field='gen-field-1' type='email' class='' urlparam=''] { "required":0, "validate_format":0, "persist": 1, "default":"[wpv-post-field name='email-field' id='$current_page']" } [/cred_generic_field] </div>
Then submit the form at least once. Edit the email notification and you should find the generic field in the options for the email destination field.
Relevant Documentation:
https://toolset.com/documentation/user-guides/inserting-generic-fields-into-forms/
https://toolset.com/documentation/user-guides/automated-email-notifications-with-cred/
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 1 reply, has 2 voices.
Last updated by 6 years, 5 months ago.
Assisted by: Christian Cox.