Answered by:
How can i align labels in CRM 4.0

Question
-
hi,
i have hidden the text field of a crm form and would like to align the label on the left side, which property can i use?
thanks
Monday, October 4, 2010 7:55 AM
Answers
-
You should use style.visibility="hidden" instead of using style.display property. This will retain blankspace.
crmForm.all.<<fieldname>>_c.style.visibility="hidden";
- Proposed as answer by HIMBAPModerator Thursday, October 7, 2010 4:00 AM
- Marked as answer by XoliswaM Thursday, October 7, 2010 6:48 AM
Tuesday, October 5, 2010 2:48 PM
All replies
-
You can use
crmForm.all.<<fieldname>>_c.style.textAlign = "left";
crmForm.all.accountnumber_c.style.textAlign = "center";
crmForm.all.accountnumber_c.vAlign = "middle";Monday, October 4, 2010 8:29 AM -
hi Vinoth B,
it doesn't seem to work on my side, let me explain what has been done. i have created 2 attributes that will serve as a titles. on the left side i have listed physical address field and on the left postal address field. so i have hidden the text field for both the addresses (title) and made them bold. now when you hide the text fields for both of them, the other one moves to the otherside to ocupy the space of the textbox that has been removed! now what i need to do is make sure that the (title) which is the label of the other field remains where its supposed to be.
i hope this makes sense!
please assist, is there a way i can tab it back to where it should be?pity i can't post the pic to show you what im talking about.
Thanks :-)
Tuesday, October 5, 2010 6:01 AM -
Try use below code to hide text fields
crmForm.all.crmfieldName.style.visibility="hidden";
Mahain : http://mahenderpal.wordpress.com- Proposed as answer by HIMBAPModerator Thursday, October 7, 2010 4:00 AM
Tuesday, October 5, 2010 6:23 AMModerator -
You should use style.visibility="hidden" instead of using style.display property. This will retain blankspace.
crmForm.all.<<fieldname>>_c.style.visibility="hidden";
- Proposed as answer by HIMBAPModerator Thursday, October 7, 2010 4:00 AM
- Marked as answer by XoliswaM Thursday, October 7, 2010 6:48 AM
Tuesday, October 5, 2010 2:48 PM -
hi Vinoth B,
THank you very much!!
It works!
Thursday, October 7, 2010 6:49 AM