1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    37
    Answers
    2
    Vote Rating
    1
    Srikanth474 is on a distinguished road

      0  

    Default 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
    Attached Images
    Last edited by Srikanth474; 4 Jun 2012 at 1:41 PM. Reason: More explanation

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,112
    Answers
    678
    Vote Rating
    470
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    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.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    37
    Answers
    2
    Vote Rating
    1
    Srikanth474 is on a distinguished road

      0  

    Default


    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

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,112
    Answers
    678
    Vote Rating
    470
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Please update the following example to show me what you mean:

    Code:
    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
        }]
    });‚Äč
    f214290.png
    Scott

Thread Participants: 1

Tags for this Thread