1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    12
    Vote Rating
    1
    a7xntho is on a distinguished road

      0  

    Default Unanswered: Problem on submitting form with sames names

    Unanswered: Problem on submitting form with sames names


    Hey,

    I've a formPanel with checkboxes with the sames names (i load dynamically the checkboxes depending on a SqlResultSet, so the number are never the same).
    If all checkboxes are False, the getValues method just return false, not an array.
    If the 2 last checkboxes are true, the getValues method return [true,true], and not the first false of the first checkbox...

    It's hard to manipulate for adding on a database.
    How can I fix the getValues for always return me a array with the size equal to the number of checkboxes !??

    (I hope my question is clear, I am ashamed of my English)
    Ps : same problem with the numberfield when the value is 0 or null !

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Answers
    3540
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      1  

    Default


    This is how html forms work. You would need to build your own array or override the getGroupValues method to push the value regardless if the field is checked or not.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    12
    Vote Rating
    1
    a7xntho is on a distinguished road

      0  

    Default


    Ok Thanks !

    So, how can i load a record to my formPanel with numberfields with identics names


    All my tentatives failed ...

    Code:
    Ext.create('ProductFormModel', {
    					product_price : [50,40,30]
    				});

Thread Participants: 1

Tags for this Thread