开发者

HTML form with zend fm

http://pastebin.com/xrzbVWse

So, I have an textarea input which has some spaces at the beginning. I press the submit button, it goes through the PHP and then echos the same stuff again into the input for correction. So, if i ha开发者_JAVA百科ve had 3 spaces then i now have 2. and if I press the button again, im getting just 1. So on each button press, it deletes me one space. I dont trim it anywhere.

Why is that? A easy solution would be to att "\n" to xmlData but i'd like to know where the problem is.


Most likely the problem is not with your code. It appears that this is how textarea input fields work, i.e. they ignore first empty line (have a look at, e.g. here, here or here) One possible workaround would be to add   to the first empty line, rather than to have it completely empty, or add \n as you suggested.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜