cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raphaël Piéroni" <raphaelpier...@gmail.com>
Subject [Cocoon 2.2] Cforms default styling for textareas
Date Fri, 30 Nov 2007 10:22:48 GMT
Hi Guys,

in the default ps-cforms-defaut.xsl
that i copied in my project ther is some bug for displaying a texte area.

Here is the extract of my xsl  for enabling textareas :

    <xsl:template name="field">
        <xsl:param name="fieldelement"/>
        <xsl:choose>
            <xsl:when test="fi:styling/@type = 'textarea'" >
                <textarea name="{$fieldelement/@id}" >
                    <xsl:if test="fi:styling">
                        <xsl:copy-of select="fi:styling/@*[name() != 'type']"/>
                    </xsl:if>
                    <xsl:value-of select="$fieldelement/fi:value"/>
                </textarea>
            </xsl:when>
            <xsl:otherwise>
                <input name="{$fieldelement/@id}"
value="{$fieldelement/fi:value}">
                    <xsl:if test="fi:styling">
                        <xsl:copy-of select="fi:styling/@*"/>
                    </xsl:if>
                </input>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>


and here is the extract of the cform template to
define a textarea : <ft:widget id="description"><fi:styling
type="textarea" rows="8" cols="60" /></ft:widget>


Regards,

Raphaël
Mime
View raw message