I haven't been able to tell if the custom routing is affecting this.
In the main Umbraco project, I've set up a surface controller to handle a POST action (a contact form) and a partial view that uses Html.BeginUmbracoForm to direct the form at my surface controller action. As described in the documentation, this correctly renders my markup with a special input field that umbraco uses to find the correct action after submitting the form. When I submit the form I can see that the form data is correctly posted and umbraco reloads the page without an error, but nothing happens... if debug and set a break point in the action it is never hit, and no email is delivered locally.
I've checked and double checked that everything is named correctly, but because the routing is handled internally I can't figure out a way to see what is going wrong. Any ideas where my data is going? How can I see how the routing works?
Thanks for the reply. Taking a break helped me spot the problem. I was including form tags inside the Html.UmbracoBeginForm brackets so the special Umbraco hidden input was being rendered after the closing form tag. Once I removed the form tags (they are added for you) it worked.
Just came across this post and saved me!!!! I've been looking at this problem for about 5 hrs and couldn't spot internal form tags...Its been stressing me out when everything else looked fine.
UmbracoBeginForm POST doesn't hit surface controller action
First, I've done some custom routing to include a plain MVC project in an area following this tutorial:
http://blog.dampee.be/post/2013/03/29/Convert-MVC-application-to-Umbraco-v6-using-Custom-Routes.aspx
I haven't been able to tell if the custom routing is affecting this.
In the main Umbraco project, I've set up a surface controller to handle a POST action (a contact form) and a partial view that uses Html.BeginUmbracoForm to direct the form at my surface controller action. As described in the documentation, this correctly renders my markup with a special input field that umbraco uses to find the correct action after submitting the form. When I submit the form I can see that the form data is correctly posted and umbraco reloads the page without an error, but nothing happens... if debug and set a break point in the action it is never hit, and no email is delivered locally.
I've checked and double checked that everything is named correctly, but because the routing is handled internally I can't figure out a way to see what is going wrong. Any ideas where my data is going? How can I see how the routing works?
Can you tell us the controller ans action names and also how you are making the post from the partial/view. Charlie :)
Thanks for the reply. Taking a break helped me spot the problem. I was including form tags inside the Html.UmbracoBeginForm brackets so the special Umbraco hidden input was being rendered after the closing form tag. Once I removed the form tags (they are added for you) it worked.
This had me going in circles for hours! Thanks for posting this - it saved me going mental!
Hi Jeremy,
Just came across this post and saved me!!!! I've been looking at this problem for about 5 hrs and couldn't spot internal form tags...Its been stressing me out when everything else looked fine.
Glad you got this sorted guys :)
is working on a reply...