Page 1 of 1
trim()
Posted: Wed Nov 29, 2006 3:45 pm
by boo_lolly
my pre-populated input fields are ending the value as soon as it hits a whitespace. for example. one input field that is pre-populated has an address. 1234 SomeStreet, right? well, the input field will only display 1234. is there a way or a function that is the antithesis of trim()? is this how i would fix the problem?
Posted: Wed Nov 29, 2006 3:53 pm
by Cameri

i don't really understand what you are asking... antithesis of trim()??
Explain yourself better, and show some code of what you are actually trying to do, that way we can understand you and help u out.
Posted: Wed Nov 29, 2006 4:23 pm
by Luke
how are you populating the fields? It sounds like something having to do with pulling from a query string maybe? Are you doing this?
Code: Select all
<form>
<input type="text" name="address" value="<?php echo $_GET['address'] ?>">
</form>
Posted: Thu Nov 30, 2006 11:35 pm
by feyd
I'll have to guess boo_lolly doesn't have quotes around the value attribute.
Posted: Fri Dec 01, 2006 11:13 am
by Luke
that would be correct... he doesn't I'm almost sure of it, because in his other post, he doesn't quote attributes either and I just whined about it in that thread before coming in here and seeing this problem again (which I had forgot about). Feyd's the man.