Copied to clipboard

Flag this post as spam?

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


  • Hywel Lewis 37 posts 138 karma points
    Jul 07, 2015 @ 14:16
    Hywel Lewis
    0

    Umbraco forms not setting date/time and giving forms and ID

    Not sure if anyone has come across this but for some reason when I am trying to output a completed Umbraco form entry as transformed XSLT

    This is my code sample;

    Your IP address : <xsl:value-of select="$records/ip"/><br/>
    Record ID : <xsl:value-of select="$records/id"/><br/>
    Updated ID : <xsl:value-of select="$records/updated"/><br/>
    state : <xsl:value-of select="$records/state"/><br/>
    Date created :  <xsl:value-of select="umbraco.library:FormatDateTime($records/created, 'r')"/>
    

    but for some reason it outputs the following in my email;

    Your IP address : 172.##.#.### (correct ip)
    Record ID : 0
    Updated ID : : 0001-01-01T00:00:00
    State : Submitted
    Date created : Mon, 01 Jan 0001 00:00:00 GMT

    Any suggestions on what may be going wrong?

    cheers Hywel

  • Hywel Lewis 37 posts 138 karma points
    Jul 07, 2015 @ 14:19
    Hywel Lewis
    0

    If it helps here is my full xslt file;

    <table style="border-collapse:collapse;border:1px solid black;" width="800">
    
    <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>
                Your IP address : <xsl:value-of select="$records/ip"/><br/>
                Record ID : <xsl:value-of select="$records/id"/><br/>
                Updated  : <xsl:value-of select="$records/updated"/><br/>
                State : <xsl:value-of select="$records/state"/><br/>
                Date created :  <xsl:value-of select="umbraco.library:FormatDateTime($records/created, 'r')"/>
                <!--****<xsl:copy-of select="$records" />******-->
            </strong>
          </td>
    </tr>
      <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="./@sortorder" data-type="number" order="ascending"/>
    
        <!--<xsl:sort select="@sortorder" data-type="number"/>-->
        <xsl:if test="normalize-space(.//value)">
    
    
    
        <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(.)"/>
                </xsl:for-each>
              </xsl:otherwise>
            </xsl:choose>
          </td>
        </tr>
        </xsl:if>
      </xsl:for-each>
    
    
    </table>
    

    `

  • Comment author was deleted

    Jul 09, 2015 @ 13:09

    Hmm might be a bug, will check and let you know

  • 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