NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on April 05, 2014, 08:18:21 AM

Title: NT8 hide menu when in a form
Post by: Alberto on April 05, 2014, 08:18:21 AM
Hi,
How can I hide the PageHeader Menu when the page is a form?
Thanks
Title: Re: NT8 hide menu when in a form
Post by: Bruce on April 06, 2014, 11:30:08 PM
there are a few ways I can think of (I haven't tried them though, so you may need to experiment a bit.)

a) on the form properties, advanced tab, set the form to use a different generic header (one without a menu.) This approach is the simplest, but does mean tweaking the setting for all forms.

b) alternatively, a "global" approach, is to embed some code in WebHandler, in the MakePage method. The second parameter there contains the procedure type, in this case you'd be checking for Net:Web:Form
So, you could, for example do something like (BEFORE the parent call);
if p_Type = net:Web:Form
  p_web.SetValue('IsAForm',1)
end


Then set the menu condition to
p_web.GetValue('IsAForm') <> 1

cheers
Bruce
Title: Re: NT8 hide menu when in a form
Post by: Alberto on April 07, 2014, 03:18:06 AM
Good!
Any way to knos if the form is a memory or a table form?
It seams impossible...
What I trying to do is that the user cant quit a Table Form by cliking on a menu item.
Thanks
Title: Re: NT8 hide menu when in a form
Post by: Bruce on April 07, 2014, 05:04:43 AM
the header is generated before it gets to the form, so no, at that stage you can't inspect any properties of the form itself.

If you only want to override some forms, then use the setting on the Advanced tab to select an alternate header.

cheers
Bruce