The ID is based on the name of the element. If your element it named "lock"
the ID will be "lock", or if using subforms, will be "{subform}-lock".

If you mess with the ID's, Zend_Form won't know how to handle the posted
data because browsers post data based on the IDs of the inputs.

Why do you need to change the ID?

--
Hector


On Tue, Feb 16, 2010 at 12:31 AM, mathieu.suen
<mathieu.s...@easyflirt.com>wrote:

> Саша Стаменковић wrote:
>
>> Chage
>>
>> $mySubForm->getElement('lock')->setAttribs('id', 'lock' .
>> $server->getUniqueId());
>>
>> to
>>
>> $mySubForm->getElement('lock')->setAttrib('id', 'lock' .
>> $server->getUniqueId());
>>
>
> Actually I mean setAttrib. The issue still remain.
> The more I dig in the code the more I get made at it.
>
> Adding design patter is a good things but in that situation it is harmful.
>
>
>> Regards,
>> Saša Stamenković
>>
>>
>>
>> On Tue, Feb 16, 2010 at 9:06 AM, mathieu.suen 
>> <mathieu.s...@easyflirt.com<mailto:
>> mathieu.s...@easyflirt.com>> wrote:
>>
>>    Hi,
>>
>>    How do you setup the id of form element?
>>    I try this:
>>
>>    $mySubForm->getElement('lock')->id = 'lock' . $server->getUniqueId();
>>
>>    and also:
>>
>>    $mySubForm->getElement('lock')->setAttribs('id', 'lock' .
>>    $server->getUniqueId());
>>
>>    But non of the above work.
>>
>>    It always yield something like : subForm-myuniqueid-load
>>
>>    Then I decide to look at the code and found out that is completely
>>    odd and really not well design IMHO.
>>
>>    So if you have any idea thanks
>>
>>    --Mathieu Suen
>>
>>
>>
>>
>>
>>
>>
> -- Mathieu Suen
>
>
>
>

Reply via email to