I have a page that lists several papers that users need to register for (through salesforce.com) There is one registration form and 3 buttons ("get doc 1", "get doc 2", "get both docs". Since this is set up through salesforce there are 2 items I cannot change:
Most of the pages only have 1 paper to register for which this works for just fine. The "Lead Source Detail" input form must have the id/name listed above and there cannot be 2. I tried adding another line, just changing the value, but the way salesforce processes this is to stop processing once it gets meets the first rule (in this case, sending out the 1st paper). It sends the user the paper, captures the lead detail and routes the user back to a returnURL of my choice.
I thought about submitting the form and having the returnURL come back with url params to feed back into another form submission, etc. The problem is that down the road my manager wants the user to be able to select as many papers as they want and do a single submission, so I can't possible hard code all the scenarios.
I have routed the form page to a test page, where I have a series of (isset ($_POST['submit_name'])) if statements, and I have created a form from each one. So now I have 3 independent forms on the page and would like to just submit all 3 at the same time. Can this be done?
Any other creative ideas for handling this? Many apologizes for the long-winded explanation...I hope I've made myself clear!
Code:
<form action="[URL unfurl="true"]https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"[/URL] method="POST" name="register" id="register">
and
<input id="00N70000001hRPE" title="Lead Source Detail" name="00N70000001hRPE" type="hidden" value="[registered paper name]" />
Most of the pages only have 1 paper to register for which this works for just fine. The "Lead Source Detail" input form must have the id/name listed above and there cannot be 2. I tried adding another line, just changing the value, but the way salesforce processes this is to stop processing once it gets meets the first rule (in this case, sending out the 1st paper). It sends the user the paper, captures the lead detail and routes the user back to a returnURL of my choice.
I thought about submitting the form and having the returnURL come back with url params to feed back into another form submission, etc. The problem is that down the road my manager wants the user to be able to select as many papers as they want and do a single submission, so I can't possible hard code all the scenarios.
I have routed the form page to a test page, where I have a series of (isset ($_POST['submit_name'])) if statements, and I have created a form from each one. So now I have 3 independent forms on the page and would like to just submit all 3 at the same time. Can this be done?
Any other creative ideas for handling this? Many apologizes for the long-winded explanation...I hope I've made myself clear!