Results 1 to 2 of 2

Thread: Form fields mapping to json values

  1. #1
    Sencha User
    Join Date
    Jun 2011
    Location
    Russia
    Posts
    39

    Default Form fields mapping to json values

    Hi!

    Is there way to bind nested json values into form fields?
    Example of my json:

    Code:
    {
    name: 'Item #123',
    company:{ name: "CompanyName1", address: "", ...}
    }
    I need to set values from inner "company" item into textfield (also displayfield, etc) via
    Code:
    myFoem.getForm().setValues(JSON)

    Thanks!

  2. #2
    chramer's Avatar
    Join Date
    Feb 2011
    Location
    Chisinau, Moldova
    Posts
    316
    Answers
    64

    Default

    Can't you just set them like this?
    Code:
    myForm.getForm().setValues(JSON.company)

Similar Threads

  1. Mapping model fields to Object with array values
    By msfounder in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 10 Jul 2014, 4:14 AM
  2. Replies: 0
    Last Post: 11 Mar 2014, 1:22 PM
  3. Data Mapping nested fields for a Json Store
    By jcamozzi in forum Sencha Architect 2.x: Help & Discussions
    Replies: 6
    Last Post: 13 Apr 2012, 6:39 PM
  4. Mapping dynamic form data fields
    By jeusdi in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 24 Dec 2008, 4:38 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •