NetTalk Central

Author Topic: Hiding and unhiding fields - Help  (Read 4066 times)

webwilcox

  • Newbie
  • *
  • Posts: 31
    • View Profile
    • Email
Hiding and unhiding fields - Help
« on: April 20, 2008, 07:33:51 PM »
I've got a form with a field called "AccountType".  It is a radio button with two possible values of "Busines" and "Personal".  The following 6 fields are also on the form :

CompanyName
CompanyAddress1
CompanyAddress2
CompanyCity
CompanyState
CompanyZip

I want to hide them with the AccountType field is "Personal" and unhide them when the AccountType field is "Business".   For each of the company fields, I have the following Hide Condition defined :

ACC:AccountType='Personal'

The field is primed to "Personal" when a form is added.  When the form is opened, all the company fields are not hidden.  I then change to "Business" and nothing happens(that's ok), I then select "Personal" again and then all the company fields disappear as they should.  After that, I can't get the company fields to re-appear at all..

Is there something else that I have to do to get fields to hide/show dynamically based on the value of a radio button or drop list??

Thanks in Advance..

Brad

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Hiding and unhiding fields - Help
« Reply #1 on: April 20, 2008, 09:15:15 PM »
you might want to try the following:

ACC:AccountType= <39>Personal<39>

and for that field ACC:AccountType set the server side to update all of the fields you are trying to hide/unhide.

HTH's

Kevin

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11245
    • View Profile
Re: Hiding and unhiding fields - Help
« Reply #2 on: April 20, 2008, 09:53:14 PM »
Hi Brad,

Almost certainly you should be using the session value of the field, not the actual value.
In other words

p_web.GetSessionValue('Acc:AccountType') = 'Personal'
this can also be written as short-hand as -
p_web.GSV('Acc:AccountType') = 'Personal'

Remember it's the session value that is "live" and "correct" as the form runs - not the file-field.

Cheers
Bruce