Javascript
Appearance
|
ATK Howto: Javascript
|
This howto demonstrates some Javascript features that are built into ATK.
Hiding and attribute or relation depending on the value of another attribute
If you have an attribute that should hide or show depending on the value of another attribute, you can use the following construct:
$attr = &$this->add(new atkListAttribute(........
$attr->addOnChangeHandler("if (newvalue=='no') { hideAttrib('colorpickthing'); }");