I am using a Select element, in form
'country' =>new sfWidgetFormChoice(array('choices' => CountryPeer::getAllCountry())),
'city' =>new sfWidgetFormChoice(array('choices' => CityPeer::getAllCity())),
i want that city element to be disabled, at the first time when the page loads. and on selection of country the city element will be enabled.(it will be loaded through AJAX call)
You can disable like this
$this->widgetSchema['country']->setAttribute('disabled', 'disabled');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With