I have the following calculated dataprovider that shows name and address data separated by a separater character (|) to save space on a form:
var line = name_xrf_to_name.clastnamefirstmiddle + " | " + name_xrf_to_name.nameaddress1 + " " + name_xrf_to_name.nameaddress2 + " | "+name_xrf_to_name.namecity + ", " + name_xrf_to_name.namestate
return line
The problem is that it is still too difficult see the various fields. I would like to color the pipe characters with a different color than the text to help visually separate the fields.
First and Last names |address lines 1 and 2 | City, State zip
Is it possible to do this within a calculated dataprovider?
Hi Erich,
Yep:
var line = '<html>' + name_xrf_to_name.clastnamefirstmiddle + " <font color=blue>|</font> " + name_xrf_to_name.nameaddress1 + " " + name_xrf_to_name.nameaddress2 + " <font color=blue>|</font> "+name_xrf_to_name.namecity + ", " + name_xrf_to_name.namestate
return line
Bob Cusick
Thanks Bob,
Now, how do I force HTML area text to show in the same font and alignment as non-HTML text? Just setting the font properties in the field does not have any effect.
Dennis
Try this (substitute “FONTNAME” and “FONTSIZE” for the font and size you want):
var line = '<html><font face=FONTNAME size=FONTSIZE>' + name_xrf_to_name.clastnamefirstmiddle + " <font color=blue>|</font> " + name_xrf_to_name.nameaddress1 + " " + name_xrf_to_name.nameaddress2 + " <font color=blue>|</font> "+name_xrf_to_name.namecity + ", " + name_xrf_to_name.namestate + '</font></html>'
return line
Cheers,
Bob Cusick
Thanks Bob:
I tried this:
var line = ‘’ + name_xrf_to_name.clastnamefirstmiddle + " | " + name_xrf_to_name.nameaddress1 + " " + name_xrf_to_name.nameaddress2 + " | "+name_xrf_to_name.namecity + “, " + name_xrf_to_name.namestate +” "+name_xrf_to_name.namezip
return line
but regardless of what FONTFACE or SIZE I enter, I still get the same font and size; although the text is now properly aligned in the field.
I spoke (typed) too soon. Latest example attachment is of a list view. Alignment problems persist when the field is in a portal (first example)