NetTalk Central

Author Topic: Conditional hide works to hide but not unhide  (Read 2841 times)

CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Conditional hide works to hide but not unhide
« on: April 17, 2014, 03:38:13 PM »
Hi,

I have an entry field that is conditional on two previous entries.  These two control entries are bytes in a memory table displayed as simple check boxes (not JQuery check boxes) with the same True False values (1,0).  One of the check boxes works perfectly, toggling the target field when the other check box is turned on.   The other check box will hide the target field on accept,  but won't reveal it .   

The client side resets all fire properly for both check boxes and I can trace the nt-hidden style being applied and removed on the server side,  but source html of the target entry only changes to hidden not back.  I noticed that the html source of the working check box includes a 'checked' property when turned on  but the other one doesn't.  I have crawled over the NT template settings and the data dictionary entries for the two check boxes and can't find any differences that would explain the presence/absence of the checked property or the problem behavior

The problem checkbox also controls the display of other entry fields which also can be hidden but not unhidden.

Here is the HTML for the working checkbox, then the problem one.

<input type="checkbox" name="MNO__MultiDay" id="MNO__MultiDay" value="1" checked="checked" title="A booking occurrence can end on a different calendar day than it starts. For 24 hour and long, continuous operations.  NOT THE SAME THING AS A REPEAT BOOKING" data-do="imm">

<input type="checkbox" name="MNO__EnableSetupCleanup" id="MNO__EnableSetupCleanup" value="1" title="Allow users to enter setup and clean up times that apply for all the resources in the bookings" data-do="imm">

What have I missed?   Using NT 7.39

Thanks so much

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Conditional hide works to hide but not unhide
« Reply #1 on: April 18, 2014, 01:21:24 AM »
>> What have I missed?

It's really hard to know the answer to this without being able to see the form in question.

Perhaps take one of the examples and just make a similar form setup there. If it works, then you've got something to compare to, if it fails then you can post it here.

From your description I'd be
checking Reset Field lists,
making sure you've used the "Hide" setting (not the "Include" setting)
making sure the Hide setting uses Session Values (not variables)
setting SessionValues, not just variables, in your hand-code

Usually it's one of the above.

cheers
Bruce


CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Re: Conditional hide works to hide but not unhide
« Reply #2 on: April 18, 2014, 04:47:52 PM »
The usual suspects to be sure,  but in this case they are innocent.   The problem turned out to be a string field used to display color selection via LiveUpdate.   Once that was excluded from the check box's reset list everything worked fine.