Results 1 to 7 of 7

Thread: Combobox to JSON

  1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    16
    Vote Rating
    0
      0  

    Default Combobox to JSON

    Hi,
    My form has three input fields which are text,text,combobox. When I try
    var dd = Ext.encode(form.getValue());
    It only gets and encodes the text inputs to the JSON, it does not include value of combobox, how can l deal with it?

    Thanks..

  2. #2
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Vote Rating
    88
      0  

    Default

    Do you mean form.getValues()? Is your combobox a child of the form?

    Can you post some code?

  3. #3
    Sencha User
    Join Date
    Dec 2012
    Posts
    16
    Vote Rating
    0
      0  

    Default

    Yes, it is child of the form.

  4. #4
    Sencha User
    Join Date
    Dec 2012
    Posts
    16
    Vote Rating
    0
      0  

    Default

    Is not there any way? I want all form's childs(inputs) to be added to JSON object but it is not able to include combobox, how can I solve this problem?

  5. #5
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Vote Rating
    88
      0  

    Default

    It should. But unless you post some code, it's difficult to trouble-shoot why you're not getting the behavior you expect.

  6. #6
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Vote Rating
    88
      1  

    Default

    Should be as simple as this example: http://jsfiddle.net/existdissolve/3xLqr/

  7. #7
    Sencha User
    Join Date
    Dec 2012
    Posts
    16
    Vote Rating
    0
      0  

    Default

    Excellent dude, both the website and your answer, thank you very much.

    Note: Actually my problem is not about the retrieving the combobox value. It was about the label of value that it retrieves it like that
    {"combobox-1018-inputEl":"Reviewer"}} , now I speficy the label and it works.

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
  •