Leading space in text field types

4 posts by 2 authors in: Forums > CMS Builder
Last Post: September 23, 2010   (RSS)

By MisterJim - September 22, 2010

Can you explain why text fields types are stored in the database with a leading space? It makes for sloppy output if you're pulling those fields out and placing them in a list if the text wraps to more than one line. The first line indents a bit.

Thanks,
Jim
WebCamp One, LLC



Websites That Work

Re: [Mr Jim] Leading space in text field types

By Chris - September 22, 2010

Hi Jim,

I don't text fields are stored with a leading space. At least, not intentionally.

You can get rid of leading whitespace using the ltrim() function:

<?php echo ltrim($record['field']) ?>

I hope this helps! Please let me know if you have any questions.
All the best,
Chris

Re: [chris] Leading space in text field types

By MisterJim - September 23, 2010 - edited: September 23, 2010

Chris,

Seems to be an issue with webkit enabled browsers. Not much I can do about that. Will try to figure another way around it.

Thanks.

Jim
WebCamp One, LLC



Websites That Work