var mform;
var simple;
+var signature;
Roo.onReady(function(){
width:175
}),
+
+
new Roo.form.TextField({
fieldLabel: 'Company',
name: 'company',
width:175
}),
+ new Roo.form.TextField({
+ fieldLabel: 'Password',
+ name: 'pwd',
+ inputType: 'password',
+ width:175
+ }),
new Roo.form.TextField({
fieldLabel: 'Email',
vtype:'email',
width:175
}),
- new Roo.form.DayPicker({
+ new Roo.form.DayPicker({
fieldLabel: 'Pick a day',
name: 'daypick',
width:175
name: 'email',
vtype:'email',
width:225
+ },
+
+ {
+ xtype : 'Select',
+ fieldLabel: 'Country',
+ name: 'scountry',
+ //vtype:'email',
+ width:225,
+ valueField :'code',
+ displayField : 'title',
+ emptyText : 'Select a country',
+ store: {
+ xtype : 'Store',
+ xns: Roo.data,
+
+ proxy: {
+ xns : Roo.data,
+ xtype : 'HttpProxy',
+ url: 'sample.data.json'
+ },
+ reader: {
+ xns : Roo.data,
+ xtype : 'JsonReader',
+ root: 'data',
+ totalProperty: 'totalCount',
+ id: 'post_id',
+ fields : [
+ 'code', 'title'
+ ]
+ }
+ },
}
]
- },
+ },
+
+
+
{
xtype : 'Column',
fieldLabel:'Biography',
width:550,
height:200,
- resizable: 's' /// where the handles should got..
+ resizable: 's', /// where the handles should got..
+ toolbars : [ 'ToolbarStandard', 'ToolbarContext' ]
}
]
}
mform.addButton('Save');
mform.addButton('Cancel');
-
+ /*
mform.render('form-ct2');
mform.setValues({
country : 'AK,LA',
countrylist : 'AG,AZ',
countrylist_names : 'Antigua and Barbuda,Azerbaijan'
});
+ */
/*
* ================ Form 3 =======================
*/
name: 'dob',
width:190,
allowBlank:false
+ }),
+ new Roo.form.MonthField({
+ fieldLabel: 'Date of Month',
+ name: 'dom',
+ width:190,
+ allowBlank:false
})
);
labelAlign: 'left',
labelWidth: 120,
items : [
+ {
+
+ xtype: 'Checkbox',
+ xns : Roo.form,
+ fieldLabel: 'A checkbox',
+ boxLabel:'RooJS v1.1.1',
+ name:'extuser',
+ inputValue : '1',
+ value : '1',
+ width:'auto'
+ },
+
+ {
+
+ xtype: 'Radio',
+ xns : Roo.form,
+ fieldLabel: 'A test radio box',
+ boxLabel:'Test1',
+ name:'radiotest',
+ inputValue : '1',
+ width:'auto'
+ },
+ {
+
+ xtype: 'Radio',
+ xns : Roo.form,
+ fieldLabel: 'A test radio box2',
+ boxLabel:'Test1',
+ name:'radiotest',
+ inputValue : '2',
+ checked: true,
+ width:'auto'
+ },
{
xtype: 'Checkbox',
value : '1',
width:'auto'
},
+
+
{
xtype : 'DisplayField',
xns : Roo.form,
form5.render('form-ct5');
- form6 = new Roo.form.Form({
- labelAlign: 'left',
- labelWidth: 120,
- items : [
- {
-
- xtype: 'TimePicker',
- xns : Roo.form,
- fieldLabel: 'test time picker',
- name: 'time'
- },
- {
- xtype: 'DateDisplay',
- xns : Roo.form,
- fieldLabel: 'test date picker',
- name: 'date'
- }
-
-
- ]
+// form6 = new Roo.form.Form({
+// labelAlign: 'left',
+// labelWidth: 120,
+// items : [
+// {
+//
+// xtype: 'TimePicker',
+// xns : Roo.form,
+// fieldLabel: 'test time picker',
+// name: 'time'
+// },
+// {
+// xtype: 'DateDisplay',
+// xns : Roo.form,
+// fieldLabel: 'test date picker',
+// name: 'date'
+// }
+//
+//
+// ]
+// });
+//
+// form6.render('form-ct6');
+
+
+
+ /*
+ * ================ form 7 =======================
+ */
+ signature = new Roo.form.Form({
+ labelWidth: 75, // label settings here cascade unless overridden
+ url:'save-form.php',
+ width: 500
});
+ signature.add(
+ new Roo.form.Signature({
+ fieldLabel: 'Signature',
+ name: 's',
+ listeners : {
+ confirm : function (_self)
+ {
+ Roo.log(_self.getImageDataURI());
+ Roo.log('in confirm');
+ }
+ },
+ width: 300
+ })
+ );
+//
+// form7.addButton('Save');
+// form7.addButton('Cancel');
+
+ signature.render('form-ct7');
+
- form6.render('form-ct6');
-