Thanks vahe.

I tried  setAttrib('disabled', 'false'), but it didnt worked. Amazingly my
html source code shows button disable property being set to 'false' but
still actual button is not enabled.
Same is the probelm with setOptions(array('disabled'=>'false');



Vahe Oughourlian wrote:
> 
> One has a multitude of possibilities in this case:
> 
> One can get the form element (the button) from the form and try to - 
>  >setAttrib('disabled', 'false'), which should try and set the  
> parameter to the button html object to false, therefore allow for the  
> button to be used.  Check the source to see if this is working; in the  
> button tag, you should see a "disabled:false" directive.  More details  
> about the attributes of the button html tag can be found online.
> 
> One can write a javascript in the view script that would, depending on  
> the get argument, set the disabled attribute to false.  This may  
> require you to pass the request variable to javascript, however.
> 
> One can, instead, by default enable all buttons on the form, but in  
> the controller action, disable the buttons which will not be used  
> depending upon the request variable (a reversal of what you're doing,  
> but it may work depending on how you're doing it).
> 
> Hopefully this helps some.
> 
> jedcred
> 
> On Feb 11, 2009, at 5:57 PM, Aniketto wrote:
> 
>>
>> Hi all,
>> I am developing a application which need buttons to be enabled on  
>> request
>> type.
>> On my first page there are links to different pages like 'update',
>> 'register', 'send mail' etc.
>> On click of any of these links a search page opens where user can  
>> search for
>> people by name and a list of people is displayed. This search page has
>> button for update, register, send mail etc respective button will  
>> take you
>> to respecive page.
>>   Now all these buttons are disabled in form.xml and depending on  
>> request
>> type (ie update, register etc ) I have to enable that respective  
>> button
>> only.
>>
>> I am enable to retrieve button with $form->getElement($name);
>> But I am not able to enable it.
>> Can anybody suggest proper method for enabling this button.
>>
>> Thanks in advance,
>> Aniket
>> -- 
>> View this message in context:
>> http://www.nabble.com/enable-submit-button-dyanamically-tp21968533p21968533.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/enable-submit-button-dyanamically-tp21968533p21968834.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to