Copied to clipboard

Flag this post as spam?

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


  • Paul Stewart 50 posts 71 karma points
    Jan 10, 2012 @ 12:11
    Paul Stewart
    0

    XSLT Single Checkbox

    Hey everyone, has anyone encounterd how to replace the text value of true / false for a single checkbox in a umbraco contour form? cause Im using a website with different lanagues I wish to use dictionary items instead of true and false.Any help is highly appriciated!

    From Screen Shot in Contour

    XSL Email Code

    <p>
      <font face="arial" color="#333333" size="2">
        <strong>
          <xsl:value-of select="umbraco.library:GetDictionaryItem('Send Me Email')"/>
        </strong> :
        "<xsl:value-of select="$records//fields/child::* [name() = 'sendmeemail']/.//value"/>"
      </font>
    </p>
  • Paul Stewart 50 posts 71 karma points
    Jan 10, 2012 @ 15:28
    Paul Stewart
    0

    I have manage to the the true or false choose statement to work, but when I have my umbraco.library item in the <xsl:when> tag it does not send out the email. any help to where why the dictionary items are not preventing the email to send out. the dictionary items do have values of "yes" and "no"

    Working code

    <xsl:choose>
            <xsl:when test="$records//fields/child::* [name() = 'sendmeemail']/.//value = 'True'">
                <xsl:value-of select="'????'"/>
            </xsl:when>
            <xsl:when test="$records//fields/child::* [name() = 'sendmeemail']/.//value = 'False'">
                <xsl:value-of select="'!!!!'"/>
            </xsl:when>
        </xsl:choose>

    Before I got it working

    <xsl:choose>
            <xsl:when test="$records//fields/child::* [name() = 'sendmeemail']/.//value = 'True'">
                <xsl:value-of select="umbraco.library:GetDictionaryItem('Send Email True')"/>
            </xsl:when>
            <xsl:when test="$records//fields/child::* [name() = 'sendmeemail']/.//value = 'False'">
                <xsl:value-of select="umbraco.library:GetDictionaryItem('Send Email False')"/>
            </xsl:when>
        </xsl:choose>
  • Paul Stewart 50 posts 71 karma points
    Jan 10, 2012 @ 16:56
    Paul Stewart
    1

    I have got the solution, but for some reason when ever you went the word "to" in the dictionary items, the email will not send out and breaks, but without it works perfectly.

     

    <xsl:variable name="emailStr">
    
            <xsl:choose>
                <xsl:when test="$records//fields/child::* [name() = 'sendmeemail']/.//value = 'True'">
                    <xsl:value-of select="string(umbraco.library:GetDictionaryItem('Send Email True'))" disable-output-escaping="no" />
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="string(umbraco.library:GetDictionaryItem('Send Email False'))" disable-output-escaping="no" />
                </xsl:otherwise>
            </xsl:choose>
    
        </xsl:variable>
    
        <xsl:value-of disable-output-escaping="no" select="$emailStr" /> 

     
Please Sign in or register to post replies

Write your reply to:

Draft