PDA

View Full Version : Tabbed form no submit disable tab



brk11
19 Jul 2010, 6:29 AM
I have a tabbed form with two tabs, one of them disabled. How can I submit the form without the fields inside the disbled tab?

brk11
19 Jul 2010, 6:35 AM
I know the solution: deferredRender: true!

Animal
19 Jul 2010, 6:38 AM
Except if you've visited that tab, and it has been rendered!

Think more.

brk11
19 Jul 2010, 6:41 AM
Yes, it's true! I'm at this point now... Any idea?

Animal
19 Jul 2010, 6:42 AM
You will have to disable all child items of the Tab.

See Container.findBy

brk11
19 Jul 2010, 6:55 AM
I have to disable the second tab if I change something of the form in the first tag... Is there any event in the form which is fired when a item in the form is changed?

Animal
19 Jul 2010, 7:29 AM
Like an input Field?

brk11
19 Jul 2010, 7:40 AM
Yes.

Animal
19 Jul 2010, 7:48 AM
They have a change event as you can see.

brk11
19 Jul 2010, 8:01 AM
Yes, I know... Are you telling me I have to define the listener for every field in the form? This could be a solution (what I knew, already), but I would like to have a solution at form level, which is what I'm asking.

brk11
22 Jul 2010, 4:53 AM
Now I have the problem if I have a required field in the disabled tab, when I submit the form and I test if it is valid, I get it isn't! Is this a bug?

Condor
22 Jul 2010, 5:27 AM
Not if you disable the field. A disabled blank field with allowBlank:false returns true for isValue().