NetTalk Central

Author Topic: NT8.45 Set form to ViewOnly -fields can stil be change?  (Read 3373 times)

johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
NT8.45 Set form to ViewOnly -fields can stil be change?
« on: April 29, 2015, 10:40:35 PM »
Hi Bruce

I have a form open from a browse. On the form i have several buttons. Each button calls an other  memory form. In some cases the form must be ViewOnly.

I add for the form called from the button under the embed point - SetAction - Start- the following code:

   if p_web.gsv('sv_ViewOnly') = 1
     Loc:ViewOnly = true
     loc:action = p_web.site.ViewPromptText
     loc:act = Net:ViewRecord
     loc:readonly = true
   END

When the condition is true it change the form to ViewOnly, the fields can still be  edit or new values added in the fields. There is also Checkbox fields on the form and can also still be changed.

Any suggestions how i can fix it so that all the controls is readonly when  the form is in View mode?

Kind regards
Johan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT8.45 Set form to ViewOnly -fields can stil be change?
« Reply #1 on: May 05, 2015, 04:37:14 AM »
I'm not sure I understand the whole setup here Johan - perhaps you can post an example for me?

cheers
Bruce