Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Huge form with different "subpanels" - Validation???

  1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    16

    Question Huge form with different "subpanels" - Validation???

    Hi all,

    I have a form that contains a layout - with different subpanels.

    Now the user has the opportunity to turn these subpanels on and off ( Ext.Panel - disabled: true / false ).

    So far so good - however in these subpanels there is some form validation taking place - now my question is how can I turn the validation on / and off according to the enabled / disabled state of the Panel?

    I tried: startMonitoring() / stopMonitoring() - which does not work (maybe because it is called for a Panel instead of a FormPanel)

    When I create the subpanels as FormPanel I get an error - does anybody have a good idea?

    The most important thing is that everything is submitted in one Post event - so I try to avoid making serveral forms out of one...

    Thanks a lot!

    Best regards,
    Eric

  2. #2
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,675

    Default

    prevent disable. Use hide / collapse or something else.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  3. #3
    Sencha User
    Join Date
    Nov 2010
    Posts
    16

    Default

    Hi Steffen,

    thanks for your fast reply - I tried both hiding & collapsing the subpanels - without success...
    It still tries to validate ( when I submit having one panel with some allowBlank: false fields collapsed / hidden / both together - it is not doing the post event... )

    Are there any other hints?

    Thanks!

    Regards,
    Eric

  4. #4
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,675

    Default

    explore your dom if you have them inside form tags.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  5. #5
    Sencha User
    Join Date
    Nov 2010
    Posts
    16

    Default

    Could you please explain in a bit more detail what you mean?
    I googled a lot - but did not find any resource that helped me

    Thanks!

  6. #6
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,675

    Default

    explore your dom means: open html view (best in firebug) and search for opening/closing form tag. look if your fields are all inside this tags.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  7. #7
    Sencha User
    Join Date
    Nov 2010
    Posts
    16

    Default

    Okay thanks - I doublechecked - and the input fields are all in the form tags.
    I think I do not get the point here...
    There must be an easy way of turning the validation off for the whole Panel (not the whole form panel, but the subpanel)

  8. #8
    Sencha User
    Join Date
    Oct 2010
    Posts
    159

    Default

    I assume that you're using fieldsets, not actually different form panels. In that case, disabling the fieldset should also disable the validation. Is that not working?

  9. #9
    Sencha User
    Join Date
    Nov 2010
    Posts
    16

    Default

    Hi again,

    first of all happy new year to everybody! Thanks for the replys.

    @mdavis6890 - I am not using fieldsets - they are actualy part of the layout but there are many of them.

    I added a picture of my current situation.

    Maybe it would be helpful to select all Childitems of the Containers ( just the containers have ids "cont1" "cont2" ... )
    and disable them - I googled around but did not find anything suitable...

    Thanks for your help!

    Best regards,
    Eric
    Attached Images Attached Images

  10. #10
    Sencha User
    Join Date
    Oct 2010
    Posts
    159

    Default

    If you're trying to make it one large POST anyway, just use one formpanel with a bunch of fieldsets. Is there a reason that you're trying to avoid this?

    Code:
    myFieldSet = Ext.extend(Ext.form.FieldSet, {
    	listeners    : {
    		collapse : function() {
    			this.items.each(function(item, index, length) {
    				item.disable();
    			});
    		},
    		expand : function() {
    			this.items.each(function(item, index, length) {
    				item.enable();
    			});
    		}
    	}
    });

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 3
    Last Post: 14 Dec 2010, 10:22 PM
  2. Replies: 3
    Last Post: 28 Oct 2009, 6:38 AM
  3. "datafield" and " radio" with load data in a Form
    By launort in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 10 Aug 2009, 7:03 AM
  4. Replies: 9
    Last Post: 20 Jun 2007, 7:36 PM
  5. Form - Fix Msg Width (validation message "under")
    By webersouza in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 16 Mar 2007, 5:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •