Unfortunately the form is at the bottom of the page, and I need it to jump down to show the form upon failure (i.e. call to CurrentUmbracoPage).
Typically this can be achieved by adding an id to the form (e.g. id="myform") and then appending "#myform" to the form action, but this doesn't seem to be possible (at least without javascript).
Is there some way around this? E.g, can I hard code the form action, but inject the hidden input named "ufprt" into the form so that Umbraco knows which surface controller to use?
Hi Alex. Unfortunately I was looking for a non javascript solution. Otherwise I may as well implement as an ajax post rather than a form submit. I was really hoping to avoid the reliance on javascript, but sounds like that won't be possible. Thanks anyway
BeginUmbracoForm with anchor appended to url
I am adding a form using the Creating an MVC form with custom html markup method.
Unfortunately the form is at the bottom of the page, and I need it to jump down to show the form upon failure (i.e. call to CurrentUmbracoPage).
Typically this can be achieved by adding an id to the form (e.g. id="myform") and then appending "#myform" to the form action, but this doesn't seem to be possible (at least without javascript).
Is there some way around this? E.g, can I hard code the form action, but inject the hidden input named "ufprt" into the form so that Umbraco knows which surface controller to use?
Hi Mark,
You are on the right way, look solution here : http://forums.asp.net/t/1898817.aspx?Using+the+anchor+in+Razor+Html+BeginForm+
http://stackoverflow.com/questions/12728827/using-mvc-how-can-i-pass-an-anchor-tag-on-a-form-submit
Thanks
Hi Alex. Unfortunately I was looking for a non javascript solution. Otherwise I may as well implement as an ajax post rather than a form submit. I was really hoping to avoid the reliance on javascript, but sounds like that won't be possible. Thanks anyway
is working on a reply...