-
4 Jun 2012 1:39 PM #1
Unanswered: Form with textfield with different length
Unanswered: Form with textfield with different length
Hello,
I am migrating a application with extjs 2 to exjs 4.
on click of a button i have a window which has a checkbox. based on the selection of a checkbox item i am adding fields dynamically. and the field is based on checkbox selection. and the field label can be anything which coming from database. the labels are lengthy and their size also varies. i atttached a sample of how i want it to be aligned.
Any Help is greatly appreciated.
Thanks
Srikanth
Last edited by Srikanth474; 4 Jun 2012 at 1:41 PM. Reason: More explanation
-
4 Jun 2012 2:40 PM #2Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,185
- Vote Rating
- 194
- Answers
- 433
Are you asking how to add fields to a form dynamically? Do you have a static set of fields in the database that can be used to hide/show certain fields, or is the list too dynamic?
Scott.
-
5 Jun 2012 5:48 AM #3
Hi Scott, i know how to add fields dynamically.
based on the check box selection i may have to add one or two textfields. and the fieldLabels are comming from database.
What i am trying to figure out is how to align the textfields in the above way.
field label may be so long that it has to take multiple line.
It is actually a paragraph. with textfields as place holders in between filled by users
Thanks
-
5 Jun 2012 6:12 PM #4Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,185
- Vote Rating
- 194
- Answers
- 433
Please update the following example to show me what you mean:
f214290.pngCode:Ext.create('Ext.form.Panel', { title: 'Contact Info', width: 300, bodyPadding: 10, renderTo: Ext.getBody(), items: [{ xtype: 'textfield', name: 'name', fieldLabel: 'This is a very long lable that should wrap', }, { xtype: 'textfield', name: 'email', fieldLabel: 'This is another label that is very long', vtype: 'email' // requires value to be a valid email address format }] });
Scott


Reply With Quote