1. #1
    Sencha User
    Join Date
    Apr 2008
    Posts
    69
    Vote Rating
    0
    jonhobbs is on a distinguished road

      0  

    Default Unanswered: split text field in form?

    Unanswered: split text field in form?


    I'm creating a form with a "first name" field and a "last name" field and I'd like to be able to put a single line on the form called "name" with two text fields side by side. Is this possible?

    If it is then I can see it being quite useful, particularly for date of birth/post code etc.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,731
    Answers
    3362
    Vote Rating
    754
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    It's possible but you will need to handle the joining and splitting yourself.

    Or you can have two fields wrapped in a container using hbox layout.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Apr 2008
    Posts
    69
    Vote Rating
    0
    jonhobbs is on a distinguished road

      0  

    Default


    I tried a container with an hbox layout, two textfields side by side and I set the label on the right hand textfield to width:0%

    Unfortunately the actual textboxes went a bit crazy and didn't fill the box correctly. The borders also looked screwed up so I'm guessing I would have to dig deep into the code and the css to fix these issues.

    Has nobody managed to successfully do this before?

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,731
    Answers
    3362
    Vote Rating
    754
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    As I said, you can use hbox:

    Code:
    new Ext.form.Panel({
        fullscreen : true,
        items      : [
            {
                xtype  : 'container',
                layout : 'hbox',
                items  : [
                    {
                        xtype       : 'textfield',
                        labelWidth  : 0,
                        flex        : 1,
                        placeHolder : 'First Name'
                    },
                    {
                        xtype       : 'textfield',
                        labelWidth  : 0,
                        flex        : 1,
                        placeHolder : 'Last Name'
                    }
                ]
            }
        ]
    });
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar