Results 1 to 6 of 6

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

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    26
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,422
    Answers
    3901
    Vote Rating
    1271
      0  

    Default

    Have you set a breakpoint to see how it is trying to get the value from the togglefields?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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
    26
    Vote Rating
    0
      0  

    Default

    Hi.

    Yes but I couldn't find anything helpful



    Back magic
    Attached Images Attached Images

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,422
    Answers
    3901
    Vote Rating
    1271
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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
    136
    Answers
    11
    Vote Rating
    7
      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
    26
    Vote Rating
    0
      0  

    Default

    Right, I'll have to learn breakpoints thoroughly.

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
  •