bacteria_
5 Oct 2007, 7:47 AM
hi people,
how to create an form and put 3 radio options in same line ???
example:
Choose an option: ( ) opt1 ( ) opt2 ( ) opt3
and not ...
Choose an option: ( ) opt1
Choose an option: ( ) opt2
Choose an option: ( ) opt3
?
thanks for all, and sorry by my bad english
See Column (http://extjs.com/deploy/ext/docs/output/Ext.form.Column.html)
<script>
Ext.onReady(function(){
var form = new Ext.form.Form({});
form.column({width: 75, labelSeparator: '', labelWidth: 0},
new Ext.form.Radio({boxLabel:'opt1', name:'opt1'})
);
form.column({width: 75, labelSeparator: '', labelWidth: 0},
new Ext.form.Radio({boxLabel:'opt2', name:'opt1'})
);
form.column({width: 75, labelSeparator: '', labelWidth: 0},
new Ext.form.Radio({boxLabel:'opt3', name:'opt1'})
);
form.render('form');
});
</script>
</head>
<body>
<div id="form" style="width:400px;"></div>
</body>
</html>
bacteria_
5 Oct 2007, 12:26 PM
thanks fay,
... this solution solve my problem in parts!!!
my actual code here
/*
* Create Form
*/
var fs = new Ext.form.Form({
id: 'login-form',
labelAlign: 'right',
labelWidth: 75,
labelSeparator: ':',
buttonAlign: 'right',
url: '/libs/php/os.json.php'
})
/*
* Create form FIELDS
*/
var myForm_os = new Ext.form.NumberField({
disabled: true,
fieldLabel: 'O.S.',
name: 'planilha',
allowBlank: false
});
var myForm_planilha = new Ext.form.NumberField({
fieldLabel: 'Planilha',
name: 'planilha',
allowBlank: false
});
var myForm_cli_dsc = new Ext.form.TextField({
fieldLabel: 'Cliente',
name: 'cli_dsc',
allowBlank: false
});
var myForm_tipo1 = new Ext.form.Radio({
fieldLabel: 'Tipo',
boxLabel: 'Instalacao',
inputValue: "0",
name: 'tipo',
allowBlank: false
});
var myForm_tipo2 = new Ext.form.Radio({
fieldLabel: 'Tipo',
boxLabel: 'Servico',
inputValue: "1",
name: 'tipo',
allowBlank: false
});
var myForm_sit = new Ext.form.NumberField({
fieldLabel: 'Situacao',
name: 'sit',
allowBlank: false
});
var myForm_local = new Ext.form.TextField({
fieldLabel: 'Local',
name: 'local',
allowBlank: false
});
var myForm_placa = new Ext.form.TextField({
fieldLabel: 'Placa',
name: 'placa',
allowBlank: false
});
fs.add(
myForm_os,
myForm_planilha,
myForm_cli_dsc,
myForm_sit,
myForm_local,
myForm_placa,
myForm_tipo1,
fs.column({width: 75, labelSeparator: '', labelWidth: 0},
new Ext.form.Radio({fieldLabel: 'Tipo', boxLabel:'opt1', name:'opt1'})
),
fs.column({width: 75, labelSeparator: '', labelWidth: 0},
new Ext.form.Radio({boxLabel:'opt2', name:'opt1'})
),
fs.column({width: 75, labelSeparator: '', labelWidth: 0},
new Ext.form.Radio({boxLabel:'opt3', name:'opt1'})
)
);
i need this:
O.S.: [input text]
Planilha: [input text]
Cliente: [input text]
Situacao: [input text]
Local: [input text]
Placa: [input text]
Tipo: ( ) opt1 ( ) opt2 ( ) opt3
thanks by atention!!!
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.