PDA

View Full Version : [solved] BasicForm.findField doesn't finc my field correctly



samax
11 Jun 2009, 2:39 AM
Hello,
I'm trying to use findField to retrieve a field in a form in order to remove it of the form. I call this function from my FormPanel object, using this syntax:

this.getForm().findField('field_name')The problem is that the result of it is null, whatever the field name I enter.

Does someone has an idea about how to resolve this problem?

Thanks

Animal
11 Jun 2009, 2:49 AM
There was a bug in RC2 which meant that Fields would not report their name in the getName() call (which findField uses) if they were not yet rendered.

Are you doing that code before the fields are all rendered?

samax
11 Jun 2009, 4:06 AM
Indeed, that was the problem. Thank you for your answer.