PHP Classes

Activate field problem

Recommend this page to a friend!

      esiform  >  All threads  >  Activate field problem  >  (Un) Subscribe thread alerts  
Subject:Activate field problem
Summary:Activating incativates
Messages:1
Author:Kacior
Date:2007-01-26 23:38:34
 

 


  1. Activate field problem   Reply   Report abuse  
Picture of Kacior Kacior - 2007-01-26 23:38:34
I try to activate a field when a checkbox is selected or another field when another checkbox (in the same field) is selected, but it results in that the field that should be activated is shown when the page loads (the checkboxes are unchecked) and if you check any of the checkboxes the field disappear and doesn't appear when I uncheck it/them. I use the "field-box-[fieldname]" id around my activate-field. General activation without "if-value" works fine.

This doesn't work for me:

// ...other fields

"mycheck" => array(
"type" => "checkbox",
"label" => "Checkboxes:",
"options" => array(
"values" => array(
"act1" => "Activate1",
"act2" => "Activate2",
),
),
"activate" => array(
"if-value" => array(
"field1" => array("activatefield1"),
"field2" => array("activatefield2"),
),
),
),
"activatefield1" => array(
"type" => "text",
"label" => "Activatefield1:",
),
"activatefield2" => array(
"type" => "text",
"label" => "Activatefield2:",
),

// other fields...