PDA

View Full Version : CheckboxGroup Submission Problem



benshort
4 Dec 2009, 2:07 AM
Hi,

I have the following checkbox group



var presetKeywords = new Ext.form.CheckboxGroup({
id:'keywords',
xtype: 'checkboxgroup',
itemCls: 'x-check-group-alt',
// Put all controls in a single column with width 100%
columns: 1,
items: [
{boxLabel: 'Lost Property', value: 'Lost Property', name: 'keywords'},
{boxLabel: 'London Underground', value: 'London Underground', name: 'keywords'},
{boxLabel: 'Other Tocs', value: 'Other Tocs', name: 'keywords'},
{boxLabel: 'Stock Machines', value: 'Stock Machines', name: 'keywords'},
{boxLabel: 'Station Facilities', value: 'Station Facilities', name: 'keywords'},
{boxLabel: 'Weather', value: 'Weather', name: 'keywords'},
{boxLabel: 'Station Updates', value: 'Station Updates', name: 'keywords'}
]
});


when I submit the form with 'Lost Property' and 'London Underground' checked I would expect to see http params as follows..



keywords=Lost+Property
keywords=London+Underground


but what I actually see is..



keywords=on
keywords=on


Is it possible to change the way the form works so it sends the http params as show?

Regards

Ben Short

ypbob
7 Dec 2009, 7:50 PM
Ben,

Did you try changing "value" to "inputValue" in your items definitions, like it says in the docs for checkboxes and radio inputs?


inputValue : String
The value that should go into the generated input element's value attribute

benshort
8 Dec 2009, 12:41 AM
ypbob,

Thanks for your reply. I did find this property and have the form working as expected.

Ben