However if using umbracoContour.RenderForm works fine. So I don't know what I am doing wrong and I really need to use the umbracoContour.RazorRenderForm for business reasons.
Looks like you have nested forms, contour (when using the razor macro) doesn't need to be in a form with runat server attribute (it will add it's own form tag)
We do have other packages installed (uComponents, RazorComponents, Courier) but I'd like to start by figuring out how the form should look for a Contour form rendered by the razor engine.
Upload file field have a problem with razor rendering
Here's the scenario.
I am creating an upload file field mandotory. And an email field not mandatory.
When using the form I select a file, place the email and hit submit, then this message is sent:
http://screencast.com/t/N4ieeGGMLi
This is happening when using RazorRenderForm.
However if using umbracoContour.RenderForm works fine. So I don't know what I am doing wrong and I really need to use the umbracoContour.RazorRenderForm for business reasons.
Thank you!
Comment author was deleted
Hey Sergio,
What version of Contour are you using, just tested the scenarion on latest stable and the form simply submits...like it should
Comment author was deleted
Also note that to get client side validation you'll need to include some scripts
check http://umbraco.com/follow-us/blog-archive/2012/11/9/getting-started-with-contour-30-beta.aspx for the list
Contour Version 3.0.6 and Umbraco 4.7.2
This is the code running on the page. I did a right click View Page Source
Comment author was deleted
Looks like you have nested forms, contour (when using the razor macro) doesn't need to be in a form with runat server attribute (it will add it's own form tag)
Ok, i saw that we were inserting that form tag. I remove it, but now when i hit submit it sends me to:
/search/results?action=ContourForm&controller=FormRender
I really don't understand why this happens. That's automatically rendered from the contour form.
Comment author was deleted
Looks like you removed both form tags...
Nope... http://screencast.com/t/tscThNYZ7
Comment author was deleted
Hmm the action on the form element looks strange, any other packages installed on your site?
I added enctype='multipart/form-data' to my form with runat server element
Hi Tim,
I'm following up on this issue on behalf of Sergio.
How should the form action look?
All of our forms, whether rendered on a page or previewed in Contour have the same action:
<form action="/search/results?action=ContourForm&controller=FormRender" ...
We do have other packages installed (uComponents, RazorComponents, Courier) but I'd like to start by figuring out how the form should look for a Contour form rendered by the razor engine.
Thanks
Note:
For some reason surrounding the razor Contour form with a <form runat="server" ... fixes the issue.
I'm not sure why this works but it isn't a very good solution as it is invalid html.
Thanks for your help
is working on a reply...