You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joerg Heinicke <jo...@gmx.de> on 2005/05/21 01:17:22 UTC
Re: CForms sharing definition files
On 23.02.2005 05:22, Marc Salvetti wrote:
> If you have access to the required data for the required fields, i think
> the easy way is to hide/disable theses fields in the template,
> if you don't, well, sharing the definition file seems to be paradoxal :-)
No, it is not. It's exactly what the separation of concerns in CForms is
about: reuse of definition in different templates.
> Dustin Jenkins a écrit :
>
>> I have a form definition file that I want shared amongst several
>> templates. Some fields are required, but won't show up on all forms.
>> The validator will still try to check the fields though for some
>> reason, even if the template doesn't specify using them. Is there a
>> way around this? I think I can move the <validation> tags from my
>> definition file to my template for some fields, but for others, such
>> as <selection-list> tags, I don't specify any validation but it is
>> still checked. Any ideas?
The required handling is indeed a problem. But you can use
union/struct/case to "switch off" parts of the form.
I'm not uptodate on CForms, but I know states have been implemented. I
don't know if this provides another way to get the "optional required"
working.
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org