cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joose Vettenranta <jo...@iki.fi>
Subject Re: cforms and matrix feature addon?
Date Sat, 17 Jul 2004 17:11:04 GMT
Hi,

I wanted to create radio button matrix. I did not find anything in 
cforms to create this, so last option was to implement it.

So, if I do implement this, what files I need to change? Atleast I have 
to change forms-field-styling.xsl, but is it enough? Could some 
developer give me insight?=)

Validation most likely can be done with javascript

> <field id="group">
>  <label>Choose </label>
>  <selection-list>
>   <item value="1">
>    <label>label 1</label>
>   </item>
>   <item value="2">
>    <label>lalbel 2</label>
>   </item>
>  </selection-list>
>  <option-list>
>   <item value="1">
>    <label>option 1</label>
>   </item>
>   <item value="2">
>    <label>option 2</label>
>   </item>
>  </option-list>
> </field>
>
> Would create table like this:
> {Choose}		{option     1}		{option 2}
> {label 1}		{radio value=1}		{radio value=2}
> {label 2}		{radio value=1}		{radio value=2}
>

as HTML this would go something like this:

<tr>
<td><label>...</label></td>
<td><input type="radio" name="group.1" value="1" /></td>
<td><input type="radio" name="group.2" value="2" /></td>
</tr>

and validation could be done like

<assert test="group.1 = group.2">
</assert>

or as <assert test="group[0] = group[1]"> ... don't know though yet how 
to do this but it perhaps would be nice...


> Should I implement it like this, or i'm going to reinvent the wheel?

- Joose

--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *


Mime
View raw message