Controlling a 'hidden' form

10 views
Skip to first unread message

Keith

unread,
Nov 9, 2009, 10:30:23 AM11/9/09
to InterSystems: Zen Community
I've got a page with a form followed by another followed by assorted
fieldsets, modal groups, etc. The second form is set to "hidden" to
begin with, but becomes visable when a certain variable is selected in
the first form. This works fine, however, the page is designed so that
when the data is entered in the first form it gets saved and the other
data is then appended to it.
My problem is that although the second form becomes viasable when it
should, it disappears again when the first form is saved. I've tried
putting the call to the Method that makes it visable is assorted
locations; the comboBox that selects the variable, putting it in an
"onrefresh" for the first form, calling it at the save time as the
Method to save the first form. But it always disappears when the page
refreshes after the save.
Anybody else had a similar problem and solved it?

Thanks,

Keith

Vlado

unread,
Nov 9, 2009, 7:41:45 PM11/9/09
to InterSystems: Zen Community
Hi Keith,
Remove hidden="true" from the XML block definition and manage
the form programmatically. To start you can use
Method onloadHandler() [ Language = javascript ]
{
zen('myform2').setProperty('hidden',true);

Keith

unread,
Nov 10, 2009, 11:33:08 AM11/10/09
to InterSystems: Zen Community
Hi Vlado,

I tried your suggestion and set the onloadHandler, but the second form
still disappears when the page is saved. Maybe because the
onloadHandler gets called again when the page is reloaded after the
save?

Keith
> > Keith- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages