Leading space in text field types
4 posts by 2 authors in: Forums > CMS Builder
Last Post: September 23, 2010 (RSS)
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
Thanks,
Jim
WebCamp One, LLC
Websites That Work
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:
I hope this helps! Please let me know if you have any questions.
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
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
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
Websites That Work
Re: [Mr Jim] Leading space in text field types
By Chris - September 23, 2010
Hi Jim,
What browsers, specifically, have this problem. I'd like to do some research and see if we can come up with a solution for this.
What browsers, specifically, have this problem. I'd like to do some research and see if we can come up with a solution for this.
All the best,
Chris
Chris