1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    22
    Vote Rating
    0
    Morfi is on a distinguished road

      0  

    Default Unanswered: Submitting array inputs in form with empty values are ignored

    Unanswered: Submitting array inputs in form with empty values are ignored


    Hello Community,

    I am trying to submit form which has dynamically generated Webclips (see screenshot), therefore name of those fields are array (Fullscreen[], IsRemovable[], etc).

    However if value is 0 or empty, it's being ignored which brings to false results. See that in webClipType array we have corresponding values `0 => SmartGuest` and `1 => SmartCrew`, however in FullScreen we have 0 => 1 which is NOT true as FullScreen is set to "true" for SmartCrew(1), not SmartGuest(0). Not to mention that if both are "false" or empty, only one is being passed.

    ref. image: http://cap.ring0.cc/3cffeecb66c08b9fdb417bd85b303f2b.png

    Thanks in advance for your help.
    Mike

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,065
    Answers
    3498
    Vote Rating
    852
    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

      0  

    Default


    Have you set a breakpoint to see how it is trying to get the value from the togglefields?
    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
    Oct 2012
    Posts
    22
    Vote Rating
    0
    Morfi is on a distinguished road

      0  

    Default


    Hi.

    Yes but I couldn't find anything helpful



    Back magic
    Attached Images

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,065
    Answers
    3498
    Vote Rating
    852
    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

      0  

    Default


    Once you get into the submit method follow it until you see where it is getting the values. It's important you know how to use a breakpoint to follow code to understand what is going on.
    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.

  5. #5
    Sencha User
    Join Date
    Nov 2011
    Location
    England
    Posts
    135
    Answers
    11
    Vote Rating
    7
    george.m is on a distinguished road

      0  

    Default


    Have you assigned names to the form fields? I've found that this has caused problems for me in the past when trying to retrieve for elements.

  6. #6
    Sencha User
    Join Date
    Oct 2012
    Posts
    22
    Vote Rating
    0
    Morfi is on a distinguished road

      0  

    Default


    Right, I'll have to learn breakpoints thoroughly.