Categories > TBS free chat >

display the data in textbox

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: katyhik
Date: 2009-01-12
Time: 11:49

display the data in textbox

hi i am trying to edit my login form .i want the previus data in the text field there i want to edit that one .can u help me how to display in  html
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']'