Hi,
I'm stuck on something simple again.
I want to hide a button widget if the value of a boolean field is false on
form load. I'm trying using <fd:on-create>:
<fd:form>
<fd:on-create>
<fd:javascript>
var widgetStateInvisible =
org.apache.cocoon.forms.formmodel.WidgetState.INVISIBLE;
var thisForm = event.source.form;
if (!thisForm .lookupWidget("okToSync").getValue) {
thisForm.lookupWidget("submitButton").state =
widgetStateInvisible;
}
</fd:javascript>
</fd:on-create>
It appears that I'm able to get a reference to the "okToSync" wigdet (it's
not null) but the value is null, I'm assuming because it is not loaded yet.
Thanks for any help,
Gary
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]