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.