Here is my requirement; I have a form where I get some account number from the user, for which I use a combination of text boxes, something like this:
Account No: [ ][ ][ ]-[ ][ ][ ][ ][ ][ ]-[ ]
*consider [ ] to be a textbox
Instead of getting the value from each textbox and combining them, is there a way I could create a custom control called ‘accountNo’ and display the textboxes as shown above and to retrieve the value using the control name ‘accountNo’?
You need to create your own component that extends a Panel or a FormPanel where you add all your TextFields in. Then you need to add a function to your custom component that return the concatenated value or all your fields. You can fine multiple examples on the web of component that’s extends others.
Here’s a place to start :
http://docs.sencha.com/touch/1-1/#!/api/Ext-method-extend