I have a page 10 sales agents; and each one should have a "get a quote" link next to it.

I'd like to send each of the links to the same webform, but have the name/email of the agent populated in the form in either a visible or a hidden field that should determine the email recipient. There should also be a fall-through value if a user finds the form without coming from the agents' page.

How can I do this without cloning the form or making the user choose a recipient when filling out the form?

Comments

twooten’s picture

Hi Lrrr,

What you want to do is setup a hidden field on your webform, let's call it 'To Agent', then for the default value of that field use '%get[to_agent]'. After you do that, you can go back to edit the webform and look for the 'Conditional e-mail recipients' fieldset inside of 'Webform mail settings'. Open that up and you'll see the hidden field you just added (To Agent). Put a check in the 'To' checkbox next to it.

Now all you have to do is build your link for each sales agent and set it up something like the following;

www.example.com/sales-agents-list/name-of-your-contact-webform?to_agent=the-agents-email@example.com

Just replace the obvious stuff like name-of-your-contact-webform and the-agents-email@example.com. That will send the correct "To:" email address to the webform.

Hope that helps,
Tim

thomas1601’s picture

Hi,
The solution work great, but what happens if someone get to www.example.com/contactform with out being passed an email address?
Is there a way to hide the email address from being seen in the link?
Thanks
-T