PDA

View Full Version : Segmented button field inside form



parseroo
2 Oct 2010, 5:59 PM
I am trying to build a UI 'from spec' and one of the common components in it is a field item that is choosing between two (maybe three) items. A segmented button is perfect for the widget, but it doesn't drop nicely into a form. Does anyone have suggestions for either how to wrap a button into form capability or build such a thing (say starting from Select, Checkbox or Toggle)? Or maybe this is in a '0.9x' roadmap item for Sencha? [Can hope]

I looked through the code of the other Form classes and it looked like enough work to make happen I figured I would check here first.

The nicest usage would look something like the below example.

--Mark



var formPanel = new Ext.form.FormPanel({
scroll: 'vertical',
items: [
{
xtype: 'fieldset',
title: 'Personal Info',
instructions: 'Please enter the information below.',
items: [
{
xtype: 'segmentedbuttonfield',
name: 'gender',
label: 'Gender',
items: [
{
text: 'Male',
value: 'male'
},
{
text: 'Female',
value: 'female'
}
]
},
]
},
]
});

bhushangahire
3 May 2011, 10:43 PM
Actually I also needed the same did you got any alternative