NetTalk Central

Author Topic: Problem still with drop downs (reproducible with example)  (Read 1736 times)

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Problem still with drop downs (reproducible with example)
« on: January 16, 2012, 08:51:54 AM »
Bruce - I cannot recall if this is something you were working on.

Using the attached test5.zip add a contact with a type = 'one'. I know you have to select it first.

Now if you note, there is an email field that should show only when type='one'. I have set type to refresh the email field in the server embed. I also put a message in there.

When you select 'one' from the drop down the code is not being run as no message appears.

However save the record and if type='one' the email field shows otherwise it is hidden. So the condition is working but not when refreshing after selecting from a drop down.

This has been a problem for a long time now. I suspect that a radio button will work but not a drop down.

Any thoughts please?

John

[attachment deleted by admin]

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Re: Problem still with drop downs (reproducible with example)
« Reply #1 on: January 16, 2012, 03:12:38 PM »
Actually Bruce - I just found out - it DOES work in reverse.

So rather than use the condition to display, use the condition to hide and it works perfectly.

This of course is when entering the record first time. Editing it works either way.

So the question is why does one work and not the other?

Thanks

John

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11204
    • View Profile
Re: Problem still with drop downs (reproducible with example)
« Reply #2 on: January 16, 2012, 11:38:46 PM »
you hit the nail on the head.

There are two settings for the field;
"Include Condition:"
and
"Hide Condition:"

The important thing to "get" is that they are not opposites of each other.

"Include" determines if the field appears on the form or not. An un-included field cannot be hidden or unhidden - it simply does not exist. The user cannot right-click on the page and inspect source  to see it's current value. It will not be part of the POST when they click on Save.

"Hide" is used for fields that _are_ on the page. It's a cosmetic convenience. the field is still on the page, and the user can "see" it if they know how to manipulate the browser. Thus hide is not suitable as a security method. The field will also be part of the POST, hidden or not.

Cheers
Bruce