|
Hi Duncan, yes, setRequired has been introduced after 2.1.7, i believe it's in 2.1.8. Unfortunately there is no way to set a widget required or not dynamically in 2.1.7. You could : - Upgrade to 2.1.8 - Take the 2.1.8 field (o.a.c.forms.formmodel.Field) source (together with builder and definition), and patch only those fiels in your 2.1.7 (this could work). - If you cannot patch cocoon, take the 2.1.8 field (same, Field, FieldDefinition and FieldDefinitionBuilder) sources, repackage them in a package of yours (eclipse refactoring can help) and then change cocoon.xconf so that does not use the default Field but your Field (which is 2.1.8 one). Haven't tested this myself, but with a bit of work should do the trick. Hope this helps. Simone Duncan McLean wrote: --Hi Simone Thanks for that, but we tried using "widget.setRequired(true)" but it reports that "setRequired is not a function".We are using Cocoon 2.1.7 - is this the problem or is it something else? Thanks Simone Gianni |
- Dynamically setting a cform field as required in javascript ... Duncan McLean
- Re: Dynamically setting a cform field as required in ja... Simone Gianni
- Re: Dynamically setting a cform field as required i... Duncan McLean
- Re: Dynamically setting a cform field as requir... Simone Gianni
- Re: Dynamically setting a cform field as re... Duncan McLean
- Re: Dynamically setting a cform field ... Robin Wyles
- Re: Dynamically setting a cform fi... Duncan McLean
