SalesForce Web To Lead Options
cube
Posted: Tuesday, June 10, 2008 6:04:50 PM
Rank: Newbie

Joined: 6/10/2008
Posts: 3
Location: Baltimore, MD
I am trying to implement a SalesForce Web To Lead form. I saw another post on this and followed the instructions and was able to get the form to display. However, the form will not submit because there are now two form tags in the page.

How can I move the action to the main form tag?
psterling@homax
Posted: Wednesday, June 11, 2008 8:35:28 PM

Rank: Fanatic

Joined: 10/30/2007
Posts: 217
Location: Bellingham
Cube -

I must say your post is a bit cryptic but I've had plenty of coffee this morning so I'll give this a stab.

It can happen that you end up with more than one ASP.NET Form tag if there is a form tag in a template underlying the content node containing your form.

As a first step to debugging I'd try placing your form on an "empty" template and verify it behaves as expected. From there you can identify where your duplicate form tags are and remove one (or more as needed) set.

Best,
-Paul

motusconnect.com :: level-2 certified :: MVP 2008/2009
cube
Posted: Wednesday, June 11, 2008 8:53:19 PM
Rank: Newbie

Joined: 6/10/2008
Posts: 3
Location: Baltimore, MD
I'm good at being cryptic... Let me explain in more detail:

I'm trying to implement a SalesForce.com web-to-lead form. Basically, SalesForce.com supplies the html, with all the proper hidden fields and form action.

Here's an example:

Code:

<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">
<input type=hidden name="oid" value="id number here...">
<input type=hidden name="retURL" value="http://www.website.com...">
<label for="first_name">First Name</label><input  id="first_name" maxlength="40" name="first_name" size="20" type="text" /><br>
<label for="last_name">Last Name</label><input  id="last_name" maxlength="80" name="last_name" size="20" type="text" /><br>
<label for="title">Title</label><input  id="title" maxlength="40" name="title" size="20" type="text" /><br>
<label for="company">Company</label><input  id="company" maxlength="40" name="company" size="20" type="text" /><br>

[etc...]

</form>


So, the fundamental problem is changing the default ASP.Net form tag that surrounds all content on an umbraco page to use the action that SalesForce.com wants us to use.

My question is how do I change the default form action on a page?

Let me know if that makes more sense...

Thanks!Angel
drobar
Posted: Wednesday, June 11, 2008 10:44:34 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,758
Location: KY, USA
Simple enough. You have three options. Each will work, but you'll probably find one of them fits your needs better than the others.

1. Remove the <?ASPNET_FORM>...</?ASPNET_FORM> tags from your templates (especially a master template) and re-insert them only when/if you need them. Keep the tags as close to the location you need them as possible.

2. As Paul said, create a new template for this page that does NOT include the ASPNET_FORM tags and does not have a master template that includes it.

3. (this is a bit of a hack) Because you can't have a form in a form... close the ASPNET_FORM tag, insert your form, and then open the ASPNET_FORM tag again. The code above would look like:
Code:

...
</?ASPNET_FORM>
<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">
<input type=hidden name="oid" value="id number here...">
<input type=hidden name="retURL" value="http://www.website.com...">
<label for="first_name">First Name</label><input  id="first_name" maxlength="40" name="first_name" size="20" type="text" /><br>
<label for="last_name">Last Name</label><input  id="last_name" maxlength="80" name="last_name" size="20" type="text" /><br>
<label for="title">Title</label><input  id="title" maxlength="40" name="title" size="20" type="text" /><br>
<label for="company">Company</label><input  id="company" maxlength="40" name="company" size="20" type="text" /><br>

[etc...]

</form>
<?ASPNET_FORM>
...


As I said, #3 is a bit of a hack but it usually works in a pinch.

cheers,
doug.

MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
cube
Posted: Wednesday, June 11, 2008 10:53:56 PM
Rank: Newbie

Joined: 6/10/2008
Posts: 3
Location: Baltimore, MD
Awesome!

Thanks!

I tried #3 since I'm a newbie and it worked. I'll experiment with the other options too as I get more experience with Umbraco.
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.