You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joose Vettenranta <jo...@iki.fi> on 2004/07/17 18:16:43 UTC
cforms and matrix feature addon?
I thought it over and over and came to this kind of solution:
have to change cforms it self to add this feature:
<field id="group1">
<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}
Should I implement it like this, or i'm going to reinvent the wheel?
Currently using cocoon 2.1.3
- Joose
--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: cforms and matrix feature addon?
Posted by Joose Vettenranta <jo...@iki.fi>.
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 *