Check the source of the page, and make sure that the 'value' value of the input type contains all of ' John Doe' (ie <input type="text" name="somevar" value=" John Doe">). If it does not, then it may be a problem with the variable you are placing into the form not actually containing anything else other than 'John'. For instance, echo the variable before populating the form to make sure the data checks out:
<?PHP
echo "Somevar value:" . $somevar;
?>
<form method="post">
<input type="text" name="somevar" value="<?PHP echo $somevar; ?>">
.... [more form fields]
</form>
If the two don't match up, then it could indicate that the data is mishandled before the form is populated. The fields themselves will accept a space as the first character.