Re: Running javascript on render

2011-08-17 Thread WebbedIT
Randy, You can use PHP to check if fields should be hidden at runtime and Javascript to then update fields as the user interacts with the form. So injecting data['ModelName']['type'] == 1) echo " style='display:none'"; ?> into your $this->Form- >input('ModelName.asset') call would set the state on

Running javascript on render

2011-08-15 Thread Randy
I'm trying to format input boxes based on the input data. In particular there is an asset field that is available (or not) based on a type field. If the type field is changed to one of several options the asset field display is turned on and off. I have it working using a small javascript function