Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8048829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:36:17+00:00 2026-06-05T06:36:17+00:00

i want to load data into a form when a user click on a

  • 0

i want to load data into a form when a user click on a row. I found some examples but not sure how to use it in my script. I made a form in architect and it looks like this

items: [
            {
                xtype: 'tabpanel',
                id: 'mainTab',
                activeTab: 0,
                region: 'center',
                items: [
                    {
                        xtype: 'panel',
                        id: 'configurationTab',
                        title: 'Configuration',
                        dockedItems: [
                            {
                                xtype: 'tabpanel',
                                height: 479,
                                id: 'configurationVehicles',
                                suspendLayout: true,
                                title: 'configuration',
                                activeTab: 0,
                                dock: 'top',
                                items: [
                                    {
                                        xtype: 'panel',
                                        id: 'configurationDrivers',
                                        layout: {
                                            type: 'border'
                                        },
                                        collapsed: false,
                                        title: 'Drivers',
                                        items: [
                                            {
                                                xtype: 'form',
                                                floating: false,
                                                height: 420,
                                                id: 'configurationDriversConfiguration',
                                                itemId: 'configurationDriversConfiguration',
                                                bodyPadding: 10,
                                                animCollapse: false,
                                                collapsed: false,
                                                collapsible: true,
                                                title: 'Driver Configuration',
                                                floatable: false,
                                                region: 'north',
                                                items: [
                                                    {
                                                        xtype: 'textfield',
                                                        id: 'configurationDriversCode',
                                                        name: 'configurationDriversCode',
                                                        fieldLabel: 'Driver Code',
                                                        allowBlank: false
                                                    },
                                                    {
                                                        xtype: 'textfield',
                                                        id: 'configurationDriversName',
                                                        fieldLabel: 'Driver Name',
                                                        allowBlank: false
                                                    },
                                                    {
                                                        xtype: 'textfield',
                                                        id: 'configurationDriversLicense',
                                                        fieldLabel: 'Driver License nr',
                                                        allowBlank: false
                                                    },
                                                    {
                                                        xtype: 'textfield',
                                                        id: 'FirstName',
                                                        name: 'FirstName',
                                                        fieldLabel: 'Driver Given Name',
                                                        allowBlank: false
                                                    },
                                                    {
                                                        xtype: 'textfield',
                                                        id: 'configurationDriversFamilyName',
                                                        fieldLabel: 'Driver Familiy Name',
                                                        allowBlank: false
                                                    },
                                                    {
                                                        xtype: 'textfield',
                                                        id: 'configurationDriversPhone',
                                                        fieldLabel: 'Driver Phone Nr',
                                                        allowBlank: false
                                                    },
                                                    {
                                                        xtype: 'textfield',
                                                        id: 'configurationDriversEmail',
                                                        fieldLabel: 'Driver Email',
                                                        allowBlank: false
                                                    },
                                                    {
                                                        xtype: 'combobox',
                                                        id: 'configurationDriversProvider',
                                                        fieldLabel: 'Provider',
                                                        allowBlank: false,
                                                        displayField: 'name',
                                                        store: 'comboProviders',
                                                        valueField: 'id'
                                                    },
                                                    {
                                                        xtype: 'textareafield',
                                                        id: 'configurationDriversMemo',
                                                        fieldLabel: 'Memo',
                                                        allowBlank: false
                                                    },
                                                    {
                                                        xtype: 'button',
                                                        handler: function(button, event) {
                                                            var form = this.up('form');
                                                            var formfields = form.getForm().getValues();
                                                            //this.up('form').getForm().submit();
                                                            console.log(formfields);
                                                            Ext.MessageBox.alert('Submitted Values', formfields);
                                                            form.getForm().reset();
                                                        },
                                                        id: 'configurationDriversSave',
                                                        text: 'Save',
                                                        formBind: true
                                                    },
                                                    {
                                                        xtype: 'button',
                                                        handler: function(button, event) {
                                                            var form = this.up('form');
                                                            form.getForm().reset();
                                                        },
                                                        style: 'margin-left: 10px;',
                                                        text: 'Clear'
                                                    }
                                                ]
                                            },
                                            {
                                                xtype: 'gridpanel',
                                                id: 'configurationDriversGrid',
                                                itemId: 'configurationDriversGrid',
                                                animCollapse: false,
                                                collapsible: true,
                                                title: 'Drivers',
                                                store: 'gridDrivers',
                                                region: 'center',
                                                viewConfig: {

                                                },
                                                columns: [
                                                    {
                                                        xtype: 'gridcolumn',
                                                        dataIndex: 'id',
                                                        text: 'Id'
                                                    },
                                                    {
                                                        xtype: 'gridcolumn',
                                                        dataIndex: 'version',
                                                        text: 'Version'
                                                    },
                                                    {
                                                        xtype: 'gridcolumn',
                                                        dataIndex: 'driverId',
                                                        text: 'DriverId'
                                                    },
                                                    {
                                                        xtype: 'gridcolumn',
                                                        id: 'FirstName',
                                                        dataIndex: 'firstName',
                                                        text: 'FirstName'
                                                    },
                                                    {
                                                        xtype: 'gridcolumn',
                                                        dataIndex: 'middleName',
                                                        text: 'MiddleName'
                                                    },
                                                    {
                                                        xtype: 'gridcolumn',
                                                        dataIndex: 'lastName',
                                                        text: 'LastName'
                                                    },
                                                    {
                                                        xtype: 'gridcolumn',
                                                        dataIndex: 'email',
                                                        text: 'Email'
                                                    },
                                                    {
                                                        xtype: 'gridcolumn',
                                                        dataIndex: 'workPhone',
                                                        text: 'WorkPhone'
                                                    },
                                                    {
                                                        xtype: 'gridcolumn',
                                                        dataIndex: 'note',
                                                        text: 'Note'
                                                    },
                                                    {
                                                        xtype: 'gridcolumn',
                                                        dataIndex: 'licenseNumber',
                                                        text: 'LicenseNumber'
                                                    },
                                                    {
                                                        xtype: 'gridcolumn',
                                                        dataIndex: 'providerId',
                                                        text: 'ProviderId'
                                                    },
                                                    {
                                                        xtype: 'actioncolumn',
                                                        id: 'idAction',
                                                        dataIndex: 'id',
                                                        items: [
                                                            {
                                                                handler: function(view, rowIndex, colIndex, item, e) {

                                                                    console.log('Delete');
                                                                },
                                                                icon: 'img/delete.png'
                                                            }
                                                        ]
                                                    }
                                                ],

I found an example like this

    onRowselectionmodelSelect: function(rowmodel, record, index, options) {
    console.log(record.get('id'));
    formpanel.getForm().load({
        url: 'xml-form-data.xml',
        waitMsg: 'Loading...'
    });
}

The formpanel.getForm().load({ should point to the form section. In the examples they used var formpanel = …
But how can i load it in this setup into my form?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:36:20+00:00Added an answer on June 5, 2026 at 6:36 am

    I suppose it is ExtJs 4. Then you can load record to the form using loadRecord function:

    var form = formpanel.getForm();
    form.loadRecord(record);
    

    After you finished editing and hit a Save button use updateRecord method to populate data back from a form to a loaded record, see: Ext.form.Basic – updateRecord.

    form.updateRecord();
    

    and then save it with store.sync() or record.save() depending on how you configured your store and model.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to load json data in form of a tree into Backbone Collection.
I want to load json data into form. my json : { success: true,
I want to load the list of the groups as well as data into
I want to load data when the user drags the scroll bar to rhw
I have a form with a DataGridView and I want to load data from
I have a UINavigationController consisting of a tableview I want to load some data
I want to save and load my xml data using XmlReader. But I don't
I want to load my data on scroll down for my tableView. I have
When I load data in my code-behind, I find that often I want to
I want to load defined folders into my website from same system, now I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.