Abisha
12 Jun 2009, 5:57 AM
Hai friends!
I am designing a form for signup new user. My form containing 3 combo boxes and textfields. Textfields aligning properly. But space between field label and combo box is more than other field. And also the options of combo is not displaying properly. It is showing vertically half of the day.
Please can you give me a solution anybody?
Thanks in advance!.
file:///C:/DOCUME%7E1/DEVELO%7E1/LOCALS%7E1/Temp/moz-screenshot.jpgfile:///C:/DOCUME%7E1/DEVELO%7E1/LOCALS%7E1/Temp/moz-screenshot-1.jpg
var Form_signup_details = new Ext.FormPanel({
id:'sign_up_details',
method: 'POST',
//region : 'left',
renderTo: 'signup_details',
layout:'form',
id:'signup_details',
frame:true,
bodyStyle:'padding:5px 25px 5px',
width: 650,
height:800,
//labelWidth:150,
defaults: {
labelStyle: 'font-family:arial; font-size:11px; color:#416AA3'
},
items: [{
columnWidth:.5,
xtype: 'component',
autoEl:{ tag:'div',
children:[{tag:'img',src: 'user/images/main.gif',cls:'item-space1'},
{tag: 'a', href: '#',onclick:'back_signup();',
children:[{tag: 'img', src: 'user/images/back.gif',cls:'item-space2'}]
},{tag: 'a', href: '#',onclick:'back_login();',
children:[{tag: 'img', src: 'user/images/cancel.gif'}]
}]
}
},{
xtype:'label',
text: "We need to gather some information from you to complete your Member account. Please answer the following questions below. Where you see an * indicates you must provide information for that particular item.",
cls:'x-form-item txt',
anchor:'98%'
},{
xtype:'label',
cls:'x-form-item head',
text:'Profile Info'
},{
xtype:'textfield',
fieldLabel: 'First Name',
name: 'firstname',
allowBlank: false,
id: 'firstname',
width:180,
height:20,
blankText: 'Enter First Name!'
},{
xtype:'textfield',
fieldLabel: 'Middle Initial',
name: 'middleinitials',
id: 'middleinitials',
width:180,
height:20
},{
xtype:'textfield',
fieldLabel: 'Last Name',
blankText: 'Enter Last Name!',
allowBlank: false,
name: 'lastname',
id: 'lastname',
width:180,
height:20
}, {
xtype:'textfield',
fieldLabel: 'Email Address',
name: 'email',
allowBlank: false,
id: 'email',
blankText: 'Enter Email Address!',
vtype:'email',
width:180,
height:20
},{
xtype:'combo',
allowBlank: false,
width:180,
height:20,
id:'language',
name:'language',
displayField:'language',
valueField:'language',
store: new Ext.data.SimpleStore({
fields: ['lang_id', 'language'],
data : Ext.exampledata.lang
}),
fieldLabel:"Language",
mode:'local',
triggerAction:'all',
emptyText:'Select a Language...'
},{
//columnWidth:.5,
xtype:'label',
cls:'x-form-item head',
text:'Member ID / Password Info'
},{
//columnWidth:.5,
xtype:'textfield',
fieldLabel: 'Member ID',
allowBlank: false,
name: 'user_id',
id: 'user_id',
width:180,
height:20
},{
//columnWidth:.5,
xtype:'textfield',
inputType:'password',
fieldLabel: 'Password',
allowBlank: false,
name: 'password',
id: 'password',
width:180,
height:20
},{
//columnWidth:.5,
xtype:'textfield',
fieldLabel: 'Retype the Password',
inputType:'password',
allowBlank: false,
name: 'signup_pwd_re',
id: 'signup_pwd_re',
width:180,
height:20
},{
xtype:'label',
cls:'x-form-item head',
text:'If you forget your Password we will ask you the following'
},{
xtype:'combo',
allowBlank: false,
id:'choose_question',
name:'choose_question',
displayField:'ques',
valueField:'ques',
width:180,
height:20,
store: new Ext.data.SimpleStore({
fields: ['ques'],
data : Ext.exampledata.ques
}),
fieldLabel:"Choose a Question",
mode:'local',
triggerAction:'all',
emptyText:'Select a Question...'
},{
//columnWidth:.5,
xtype:'textfield',
fieldLabel: 'Answer to your Question',
allowBlank: false,
name: 'answer_question',
id: 'answer_question',
width:180,
height:20
},{
xtype:'label',
cls:'x-form-item head',
text:'Repair Center Info'
},{
xtype:'combo',
width:120,
align:'left',
id:'specify_repair',
name:'specify_repair',
displayField:'repair_center_name',
valueField:'repair_center_id',
store: loginrepair_store,
autoScroll:true,
editable: false,
mode: 'local',
selectOnFocus:true,
triggerAction:'all',
width:180,
height:20,
emptyText:'Specify your Repair Center!'
},{
xtype:'label',
cls:'x-form-item head',
text:'Terms of Use'
},{
xtype: 'checkbox',
anchor:'98%',
boxLabel: 'I have read and accept the terms of use. (see below)',
name: 'term_check',
labelSeparator : '',
itemCls:'td-east',
id:'term_check',
inputValue: 'terms'
},{
buttons: [{
text: 'OK',
name: 'sign_up_ok',
id: 'sign_up_ok'
}
]},{
xtype:'textarea',
labelSeparator : '',
readOnly: true,
allowBlank: true,
value:'default value',
height:200,
width:200
}]
});
I am designing a form for signup new user. My form containing 3 combo boxes and textfields. Textfields aligning properly. But space between field label and combo box is more than other field. And also the options of combo is not displaying properly. It is showing vertically half of the day.
Please can you give me a solution anybody?
Thanks in advance!.
file:///C:/DOCUME%7E1/DEVELO%7E1/LOCALS%7E1/Temp/moz-screenshot.jpgfile:///C:/DOCUME%7E1/DEVELO%7E1/LOCALS%7E1/Temp/moz-screenshot-1.jpg
var Form_signup_details = new Ext.FormPanel({
id:'sign_up_details',
method: 'POST',
//region : 'left',
renderTo: 'signup_details',
layout:'form',
id:'signup_details',
frame:true,
bodyStyle:'padding:5px 25px 5px',
width: 650,
height:800,
//labelWidth:150,
defaults: {
labelStyle: 'font-family:arial; font-size:11px; color:#416AA3'
},
items: [{
columnWidth:.5,
xtype: 'component',
autoEl:{ tag:'div',
children:[{tag:'img',src: 'user/images/main.gif',cls:'item-space1'},
{tag: 'a', href: '#',onclick:'back_signup();',
children:[{tag: 'img', src: 'user/images/back.gif',cls:'item-space2'}]
},{tag: 'a', href: '#',onclick:'back_login();',
children:[{tag: 'img', src: 'user/images/cancel.gif'}]
}]
}
},{
xtype:'label',
text: "We need to gather some information from you to complete your Member account. Please answer the following questions below. Where you see an * indicates you must provide information for that particular item.",
cls:'x-form-item txt',
anchor:'98%'
},{
xtype:'label',
cls:'x-form-item head',
text:'Profile Info'
},{
xtype:'textfield',
fieldLabel: 'First Name',
name: 'firstname',
allowBlank: false,
id: 'firstname',
width:180,
height:20,
blankText: 'Enter First Name!'
},{
xtype:'textfield',
fieldLabel: 'Middle Initial',
name: 'middleinitials',
id: 'middleinitials',
width:180,
height:20
},{
xtype:'textfield',
fieldLabel: 'Last Name',
blankText: 'Enter Last Name!',
allowBlank: false,
name: 'lastname',
id: 'lastname',
width:180,
height:20
}, {
xtype:'textfield',
fieldLabel: 'Email Address',
name: 'email',
allowBlank: false,
id: 'email',
blankText: 'Enter Email Address!',
vtype:'email',
width:180,
height:20
},{
xtype:'combo',
allowBlank: false,
width:180,
height:20,
id:'language',
name:'language',
displayField:'language',
valueField:'language',
store: new Ext.data.SimpleStore({
fields: ['lang_id', 'language'],
data : Ext.exampledata.lang
}),
fieldLabel:"Language",
mode:'local',
triggerAction:'all',
emptyText:'Select a Language...'
},{
//columnWidth:.5,
xtype:'label',
cls:'x-form-item head',
text:'Member ID / Password Info'
},{
//columnWidth:.5,
xtype:'textfield',
fieldLabel: 'Member ID',
allowBlank: false,
name: 'user_id',
id: 'user_id',
width:180,
height:20
},{
//columnWidth:.5,
xtype:'textfield',
inputType:'password',
fieldLabel: 'Password',
allowBlank: false,
name: 'password',
id: 'password',
width:180,
height:20
},{
//columnWidth:.5,
xtype:'textfield',
fieldLabel: 'Retype the Password',
inputType:'password',
allowBlank: false,
name: 'signup_pwd_re',
id: 'signup_pwd_re',
width:180,
height:20
},{
xtype:'label',
cls:'x-form-item head',
text:'If you forget your Password we will ask you the following'
},{
xtype:'combo',
allowBlank: false,
id:'choose_question',
name:'choose_question',
displayField:'ques',
valueField:'ques',
width:180,
height:20,
store: new Ext.data.SimpleStore({
fields: ['ques'],
data : Ext.exampledata.ques
}),
fieldLabel:"Choose a Question",
mode:'local',
triggerAction:'all',
emptyText:'Select a Question...'
},{
//columnWidth:.5,
xtype:'textfield',
fieldLabel: 'Answer to your Question',
allowBlank: false,
name: 'answer_question',
id: 'answer_question',
width:180,
height:20
},{
xtype:'label',
cls:'x-form-item head',
text:'Repair Center Info'
},{
xtype:'combo',
width:120,
align:'left',
id:'specify_repair',
name:'specify_repair',
displayField:'repair_center_name',
valueField:'repair_center_id',
store: loginrepair_store,
autoScroll:true,
editable: false,
mode: 'local',
selectOnFocus:true,
triggerAction:'all',
width:180,
height:20,
emptyText:'Specify your Repair Center!'
},{
xtype:'label',
cls:'x-form-item head',
text:'Terms of Use'
},{
xtype: 'checkbox',
anchor:'98%',
boxLabel: 'I have read and accept the terms of use. (see below)',
name: 'term_check',
labelSeparator : '',
itemCls:'td-east',
id:'term_check',
inputValue: 'terms'
},{
buttons: [{
text: 'OK',
name: 'sign_up_ok',
id: 'sign_up_ok'
}
]},{
xtype:'textarea',
labelSeparator : '',
readOnly: true,
allowBlank: true,
value:'default value',
height:200,
width:200
}]
});