PDA

View Full Version : create custom form field



ultra2
2 Jan 2013, 5:27 PM
I need to create a custom form field component. The input data is a comma separated string. I want it to show in a grid and to be editable and labelable such as a normal form field.
Which is the right way to start:
-inherit from Ext.grid.Panel and add labelable mixin...
-inherit from Ext.form.field.base but how to show a grid?
-inherit from Ext.form.FieldContainer and add a grid to its items?

pls help

mitchellsimoens
4 Jan 2013, 8:26 AM
I usually just use a grid panel, add some methods and the isFormField property to make it be handled as a form field and then style the header so it looks like a label. IMO the issue with having a label on the left is you get a big white space so this gives you the ability to have a top alined label.