Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Steve 472 posts 1216 karma points
    Dec 09, 2014 @ 22:43
    Steve
    0

    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?

  • Dennis Aaen 4457 posts 17970 karma points admin hq c-trib
    Dec 09, 2014 @ 23:06
    Dennis Aaen
    0

    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

  • Steve 472 posts 1216 karma points
    Dec 10, 2014 @ 15:03
    Steve
    0

    Thanks Dennis, I'll try this. I just hope it works with the Razor macro.

  • Steve 472 posts 1216 karma points
    Dec 11, 2014 @ 14:50
    Steve
    0

    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

  • Dennis Aaen 4457 posts 17970 karma points admin hq c-trib
    Dec 11, 2014 @ 14:53
    Dennis Aaen
    0

    Hi Steve,

    I think that you grab the right package for a Umbraco version 6.1.6

    /Dennis

  • Steve 472 posts 1216 karma points
    Dec 11, 2014 @ 15:18
    Steve
    0

    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() &gt; 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>
  • Steve 472 posts 1216 karma points
    Dec 11, 2014 @ 18:43
    Steve
    100

    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!

  • Dennis Aaen 4457 posts 17970 karma points admin hq c-trib
    Dec 11, 2014 @ 18:55
    Dennis Aaen
    0

    Hi Steve,

    Great that you found a solution for this.

    /Dennis

  • 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.

Please Sign in or register to post replies