Having conditional logic in the notifications for each page to the form
Both these after a few hundred suppliers will be difficult to manage
Instead of creating a new form for every supplier page or conditional logic, i would like to see how i can integrate 1 form on all pages with the notification dynamically adding a suppliers email address though the notifications “send to email”
I’d look for a way to save the supplier email as a meta field on their specific page. You could then use the gform_notification filter to set the to email. Something like the following should work once you have a way to save the meta as supplier_email.
Use one form for all the different supplier pages. Don’t make multiple forms.
If you can store the supplier email in the post meta for the post (this is key) you can also do this:
Add an email field to the form. Give it a default value of {custom_field:supplier_email} (assuming you stored their email address in a custom field with the meta key ‘supplier_email’). You can make this field hidden if you want to, so it’s not shown on the front end of the form.
Then, you can select this email field in your “Send To” for the notification. Select the “Select a field” radio button, then select your “supplier email” field in the dropdown. That will populate the notification with the email address that was pulled from the post custom field.
Either way should work. If you need any other ideas, please let us know.