By: James
Date: 2009-03-06
Time: 16:48
|
Re: display the data in textbox
If I understand correctly, what you're trying to do is display a text field with a value already entered. The way you do that is to set the value attribute of the text field. For example:
<input type='text' name='loginname' value='[block.loginname]'>
The field name is whatever you want to call it and is what you will use to access the value that is input. It could be 'username', etc. On the page that processes the login request, you access it by $_POST['username'].
The value is what is displayed in that text box. With a login form, the visitor might not be registered for your site yet and wouldn't have a login name. In that case, you can use TBS conditional fields to display their username if they do have one, and a sentence that tells them to pick one if they don't. Just use:
<input type='text' name='loginname' value='[block.username;ifempty = 'choose a user name']'
|