Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Sep 2009
    Posts
    6
    Vote Rating
    0
    perkinsit is on a distinguished road

      0  

    Default JSON Formatting Issue

    JSON Formatting Issue


    I am new to ExtJS and have run into a problem I don't see addressed anywhere. When I create traditional web forms, outside of ExtJS, I use an array naming scheme to allow me to segment information based on its purpose and where it needs to be inserted. For instance, I might have a profile update form with the following fields:
    • First Name
    • Last Name
    • Email Address
    • Social Security #
    • Street Address
    • City
    • State
    • Zip
    And I might use a naming scheme to separate the name from the address like:
    • contact[fname]
    • contact[lname]
    • contact[ss_num]
    • contact[email]
    • addr[street]
    • addr[city]
    • addr[state]
    • addr[zip]
    This allows me to pass the entire $_POST array (yes, I use PHP) to the function, and then within the function I can use the different arrays within $_POST and loop through them to create my queries.

    My question is this, I have a multitab form that I would very much like to segment the information on each form to be within its own container within a main JSON container, much like the multidimensional array I mentioned above. Is this just a matter of naming the fields within the form a certain way? Any help on this would be greatly appreciated.

    Thanks!

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    77
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    yes, try
    you can try contact.fname, contact.lname, etc and try to use the json_decode to try to read them.

  3. #3
    Ext User
    Join Date
    Sep 2009
    Posts
    6
    Vote Rating
    0
    perkinsit is on a distinguished road

      0  

    Default


    Thanks for your reply. I just want to be clear. I have no problems getting the data in the form I need it from ExtJS to php (submits via $_POST) with AJAX, but when I try to load a record from the database and populate the form, the field names don't match up because the form shows, for instance, consumer[fname], but the field name from the database is named 'fname'. So when I use the loadRecord() function, none of the fields match, so nothing populates. I would like to be able to load the data, allow for edits, and then submit the data, all using the array naming scheme I mentioned before. Hope that helps, and thanks for your assistance!

  4. #4
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    77
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    you need to work to make sure it matches.

Thread Participants: 1