-
1 Oct 2009 4:40 AM #201
I think the focus on reset should be removed, since this is not consistent with other fields, and will have the element rendered as invalid when allowBlank=false.PHP Code:reset : function(){
Ext.ux.form.SuperBoxSelect.superclass.reset.call(this);
this.addedRecords = [];
this.autoSize().setRawValue('');
//this.el.focus();
},
Also I'm having some problems parsing the data in php when I'm using form.submit(). Data is sent as multipart/form, and that prevents me from parsing array's in POST data. Is there a way to submit a comma seperated list (as with getValue())?
-
1 Oct 2009 8:30 AM #202
-
1 Oct 2009 3:47 PM #203
@JorisA
Thanks, I'll have a look at the reset method.
With regards to your form submission; I use PHP without any problems.
Are you aware that you need to name your form elements with square brackets to enable array processing:
ie:
This seems to catch a few people out, but it's the same with regular HTML forms too.PHP Code:name: 'states[]'
@pilotsnipes
I believe @radtad was going to make a plugin of this functionality - he may respond here.
-
1 Oct 2009 4:49 PM #204
I actually ended up extending the functionality with an override. The two config options to use with this are:
Enjoy.Code:anyMatch: (true|false) // default: true caseSensitive: (true|false) // default: false
-
2 Oct 2009 1:16 AM #205
@radtad - Thank you so much for this! What a difference it makes to my script. Very easy to setup as well (I still think this should be in the main superboxselect but I'm happy just to add it at the moment!)
Thanks again!
@danh2000 - no doubt you receive too many requests for help, but would it be possible for you to post a full copy of a demo/simplified code showing this, I find it's so much easier to learn when I have a working example to study from. I would really appreciate it. Thank you for the help so far.
-
2 Oct 2009 3:54 PM #206
There are many examples available:
http://technomedia.co.uk/SuperBoxSelect/examples.html
http://technomedia.co.uk/SuperBoxSelect/examples3.html
http://technomedia.co.uk/SuperBoxSel...ples3gray.html
http://technomedia.co.uk/SuperBoxSel...lesRemote.html
If you specifically mean using PHP and the array access, it's pretty simple - PHP requires square brackets at the end of form field names to indicate that it is array data. Therefore if you are using PHP and you are submitting the raw form - put square brackets at the end of the name.
Eg:
If your field is named states then name it states[] instead.
Additional info: http://us2.php.net/manual/en/faq.htm...aq.html.arrays
-
4 Oct 2009 11:49 AM #207
Please change
toPHP Code:findInStore : function(val){
var index = this.store.find(this.valueField, val.trim());
so that values other than strings are supported.PHP Code:findInStore : function(val){
var index = this.store.find(this.valueField, Ext.isString (val) ? val.trim() : val);
Cheers,
Jörm
-
7 Oct 2009 3:34 PM #208
superboxselect reset
superboxselect reset
the .reset() method doesn't seem to be working correctly for me. If I use it and then immediately click on the drop down arrow I get a "this.list" is not defined.
Suggestions?
-
7 Oct 2009 3:35 PM #209
-
7 Oct 2009 4:06 PM #210
I mean .suspendEvents() and .resumeEvents(), not .reset()



Reply With Quote