There was a forum post about this already, but the user's contact form was built from Contour. Looking at some other related topics isn't answering my question. Am I being really dense or is there an easy way I can change the default behavior of the form so that it can post to the correct URL? Thanks in advance!
I can see there is runat="server" in your first form tag. Using the runat="server" in form, the form is always submitted to the same page which you're viewing and if you set an action attribute, it is ignored and always set an action to post method. So if you want to post form to external url then you should remove runat="server".
Thanks for the responses! @Pasang: Removing the runat="server" caused the page to break for some reason. I ended up adding another form element with the runat="server" and removing that from the Salesforce form element. I really appreciate the help!
Want to post form to external url
Hello
I created a custom contact form, that is supposed to post to an external URL, specifically SalesForce.
The HTML output however is
There was a forum post about this already, but the user's contact form was built from Contour. Looking at some other related topics isn't answering my question. Am I being really dense or is there an easy way I can change the default behavior of the form so that it can post to the correct URL? Thanks in advance!
Phil
You can only include a new form on the page outside the default ASP.NET form: http://www.frederikvig.com/2009/06/using-multiple-forms-on-an-asp-net-web-forms-page/
Hi Phillip,
I can see there is runat="server" in your first form tag. Using the runat="server" in form, the form is always submitted to the same page which you're viewing and if you set an action attribute, it is ignored and always set an action to post method. So if you want to post form to external url then you should remove runat="server".
Thanks
Pnima
Thanks for the responses! @Pasang: Removing the runat="server" caused the page to break for some reason. I ended up adding another form element with the runat="server" and removing that from the Salesforce form element. I really appreciate the help!
is working on a reply...