Need Form Conditions and the File Upload Field to Work
I need the ability to use condtional fields, which are done using the Razor macro version of the Controur form, but if I do this, then any files attached to the form are not uploaded or sent on the recipient email with the form data.
Is there a way to make the uploads work using the Razor macro? Or will it only work with the userControl?
I dug around some more and found a great solution. If you add enctype="multipart/form-data" to your runat=server form wrapper on the template using the Razor form macro you can use conditions and file upload fields!
Need Form Conditions and the File Upload Field to Work
I need the ability to use condtional fields, which are done using the Razor macro version of the Controur form, but if I do this, then any files attached to the form are not uploaded or sent on the recipient email with the form data.
Is there a way to make the uploads work using the Razor macro? Or will it only work with the userControl?
Hi Steve,
I can see there is a issue on the issue tracker for Make it possible to attach file uploads to the email http://issues.umbraco.org/issue/CON-624, it should have been fixed in version 3.0.24. Here is an overiew of the changes http://nightly.umbraco.org/Umbraco%20Contour/changes.txt
You can find the version 3.0.24 of Contour here. http://nightly.umbraco.org/Umbraco%20Contour/3.0/
Perhaps this solve your problem?
Hope this helps,
/Dennis
Thanks Dennis, I'll try this. I just hope it works with the Razor macro.
Would this be the right package for Umbraco v 6.1.6? I am trying to upgrade from v 3.0.21
http://nightly.umbraco.org/Umbraco%20Contour/3.0/UmbracoForms.package.3.0.24.WIP-Build.28.V6.zip
Hi Steve,
I think that you grab the right package for a Umbraco version 6.1.6
/Dennis
It is still not including the uploaded file from the form field in the email. Here is my xslt file. Have I got the syntax correct on the xsl:choose?
<xsl:param name="records" /> <xsl:template match="/"> <table style="border-collapse:collapse;border:1px solid black;"> <xsl:for-each select="$records//fields/child::*"> <xsl:sort select="./@pageindex" data-type="number" order="ascending"/> <xsl:sort select="./@fieldsetindex" data-type="number" order="ascending"/> <xsl:sort select="./@caption" data-type="number" order="ascending"/> <xsl:sort select="./@sortorder" data-type="number" order="ascending"/> <tr style="border:1px solid black;"> <td valign="top" style="border:1px solid black;padding:5px;font-family:Verdana,Helvetica,Arial,sans-serif;font-size:11px;"> <strong> <xsl:value-of select="./caption"/> </strong> </td> <td valign="top" style="border:1px solid black;padding:5px;font-family:Verdana,Helvetica,Arial,sans-serif;font-size:11px;"> <xsl:choose> <xsl:when test="contains(.//value, '/umbraco/plugins/umbracoContour/files/')"> <a href="http://{umbraco.library:RequestServerVariables('SERVER_NAME')}{.//value}"> <xsl:value-of select="substring-after(substring-after(.//value, '/files/'), '/')"/> </a> </xsl:when> <xsl:otherwise> <xsl:for-each select="./values/value"> <xsl:if test="position() > 1"> <br /> </xsl:if> <xsl:value-of select="umbraco.library:ReplaceLineBreaks(.)" disable-output-escaping="yes"/> </xsl:for-each> </xsl:otherwise> </xsl:choose> </td> </tr> </xsl:for-each> </table> </xsl:template>I dug around some more and found a great solution. If you add enctype="multipart/form-data" to your runat=server form wrapper on the template using the Razor form macro you can use conditions and file upload fields!
Hi Steve,
Great that you found a solution for this.
/Dennis
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.