Results 1 to 3 of 3

Thread: 6.5.x Form layout does not accept FieldSet

  1. #1
    Sencha Premium User
    Join Date
    Mar 2017
    Posts
    21

    Question Answered: 6.5.x Form layout does not accept FieldSet

    Hi,

    Form layout has been added to ExtJS 6.5.0

    I'm doing :
    PHP Code:
    {
        
    xtype:'formpanel',
        
    layout'form',
        
    items:[{
            
    xtype:'textfield'
        
    },{
            
    xtype:'fieldset'
        
    }]

    I'm getting :
    HTML Code:
    "Cannot add item to container.  Only Ext.field.Field instances are allowed as inner items in a form layout."
    because :

    PHP Code:
    Ext.define('Ext.layout.Form', {
        ...
        
    onItemAdd: function(itemindex) {
            if (
    item.isInner && !item.isFormField) {
                
    Ext.raise("Cannot add item to container.  Only Ext.field.Field instances are allowed as inner items in a form layout.");
            }
            
    this.callParent([
                
    item,
                
    index
            
    ]);
        }
    }); 
    What is the standard way to get a FieldSet as an item of a Form with 'form' layout ?

    Thanks

  2. The form layout in modern exists just to allow auto widthing of labels of fields.

    If you want a fieldset halfway down your form, you need the form to be layout vbox, and contain a form layout container, then a fieldset

  3. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892
    Answers
    41

    Default

    The form layout in modern exists just to allow auto widthing of labels of fields.

    If you want a fieldset halfway down your form, you need the form to be layout vbox, and contain a form layout container, then a fieldset

  4. #3
    Sencha Premium User
    Join Date
    Mar 2017
    Posts
    21

    Default

    Ok. Thank you.

Similar Threads

  1. Form inside FieldSet layout issue
    By frank.zammetti in forum Ext: Q&A
    Replies: 3
    Last Post: 10 Jan 2014, 11:21 AM
  2. form submit don't accept success
    By noimehl in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 7 Dec 2010, 2:12 AM
  3. Form fieldset doesn't show column layout correctly
    By paulwang727 in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 3 Sep 2008, 2:00 PM
  4. Form fieldset layout issue
    By buntyindia in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 29 May 2008, 6:44 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
  •