-
4 Jun 2012 4:46 AM #1
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 !
-
5 Jun 2012 5:47 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 434
- Answers
- 3102
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
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
6 Jun 2012 7:16 AM #3
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] });


Reply With Quote