On Mar 26, 2004, at 11:11 AM, Joerg Heinicke wrote:


On 26.03.2004 20:01, Mark Lundquist wrote:
[Surjan wrote:]

I thought of hiding the second list field if it's not required, but I don't know how to do that either.
Try this...
Hmm, if I read the above I think he only wants to conditionalize the requiredness of selectionlist 2 in dependency on selectionlist 1, not the displaying.

See above :-)


This is what was called "optionally required" in discussions:
http://marc.theaimsgroup.com/?t=107349479500003&r=1&w=4

Vadim has provided a solution:
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107352171910636&w=4

I have not used the XReporter expressions, but javascript using
<wd:validation>
  <wd:javascript>
    if (widget1 != null && widget2 == null) {
      widget2.setValidationError =
                             new ValidationError(general.required);
    } else {
      widget2.setValidationError = null;
    }
  </wd:javascript>
</wd:validation>

Nice. How would I do that from flow? I could use form.onValidate()... or, can this be done on a per-widget basis in v2?


Thanks,
mark


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to