cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian K├Ânitzer <>
Subject Re: cform fi:styling
Date Thu, 03 Mar 2005 13:20:43 GMT

You define your field's in a file called e.g. "forms.xml":
(this is an example of a dropeDown List)

<fd:field id="availableBookmarks" required="false">
            <fd:datatype base="string"/>      
            <fd:selection-list     type="flow-jxpath"

But your styling-information doesn't belong inside it.
For that you have an other file called e.g. "template.xml" (it's like 
yout HTML-file):

<ft:widget id="availableBookmarks">
    <fi:styling size="1" />
    <fi:styling onchange="javascript:sendForm('change_type');"/>
You see, for each styling information you can make an own entry.

So, if you like to make a radio-botton, but this example in your 
    <fd:field id="adresse1b" required="false">
            <fd:datatype base="integer"/>
            <fd:selection-list >

and this example in your "template.xml":
    <ft:widget id="adresse1b">
        <fi:styling list-type="radio"/>
[as much more styling as you like to have]


I hope you understand :)

Regards Chris

Philippe Guillard wrote:

> Hi all,
> It seems that the usual way to add some attributes to a field in 
> CForms is to use  fi:styling tags.
> I tried this on a fd:field without success : <fi:styling 
> list-type="radio" onChange="javascript: test();"/>, it seems that i 
> can only add one attribute, in that case list-type or onChange, but 
> not the two. I checked forms-field-styling.xsl and added :
>  <xsl:template match="fi:styling/@onChange" mode="styling">
>      <xsl:attribute name="onchange"><xsl:copy-of 
> select="."/></xsl:attribute>
>  </xsl:template>
> No result the onChange attribute is not copied.
> Any idea?
> Phil
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message