Results 1 to 3 of 3

Thread: Submit form with both display and value fields of Combobox

  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    61
    Vote Rating
    4
      0  

    Default Submit form with both display and value fields of Combobox

    When I submit the form or use getValues, I would like to have the form to retain both the displayField and valueField in the combobox.

    My solution is creating a hidden field , listen to combobox's change event and set the value.

    Is there a more elegant solution?

    Thanks in advance.

  2. #2
    Sencha User
    Join Date
    Sep 2009
    Location
    Calgary, Alberta, Canada
    Posts
    638
    Vote Rating
    2
      0  

    Post

    I don't see the reason why you would need to retain both, it would defeat the purpose of valueField.

    I have only seen one or the other. In fact, you can specify the hiddenName and hiddenValue to use the valueField instead of the displayField as the return in getValues.

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    61
    Vote Rating
    4
      0  

    Default

    My form never really submits anything. I just get the values and reload a grid with those params.

    When I use the History to repopulate the forms, the setValues does not neccessarily execute after the combo store load. AND I really don't want to load the stores for all the comoboboxes.

    So if I can get both values , I could just add a single record to the store for the combobox to display the 'displayField' instead of the 'valueField'.

Posting Permissions

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