PHOCOA PHP Framework

Dynamic Hiding of Elements and their Context

While all UI widgets support a "hidden" attribute that causes them to not be rendered, sometimes there is supporting HTML that surrounds the widget that also needs to be hidden. This is particularly common when optionally including data in a table, where you might want to exclude an entire row if a piece of data is missing.

Toggle Visibility: Show Hide

Simple Example

This example hides a table row if the "name" field is hidden.

Name: Alan
City: Memphis


<table border="0" cellspacing="0" cellpadding="3">
    {WFViewHiddenHelper id="name"}
        <td valign="top" align="right">Name:</td>
        <td valign="top">{WFView id="name"}</td>
        <td valign="top" align="right">City:</td>
        <td valign="top">{WFView id="city"}</td>

Dynamic Example

WFViewHiddenHelper also works with WFDynamic's. This example hides "Alan" and "David".

  • Alan
  • Bob
  • David
  • Chris


{section name=items loop=$__module->valueForKeyPath('People.arrangedObjectCount')}
    {WFViewHiddenHelper id="listName"}<li>{WFDynamic id="listName"}</li>{/WFViewHiddenHelper}



Basic Examples
  Skin Browser
  Regex Tester

AJAX Examples

  (YUI Examples)
  Tree View
  Tab View

Appcelerator Integration
Copyright (c) 2018 Alan Pinstein. All Rights Reserved.