[Input]Any Text[/Input]

Prepares text for use in input forms such as <textarea> tags.

To prepare text fields that may contain carriage returns for use in <textarea> portions of a form, put it inside an [Input] context. Certain letters, such as carriage returns, are converted to "soft-returns" when they are saved in a database file. The [Input] context converts them back to "hard-returns" so they look right when displayed inside <textarea> tags. Other letters, such as "<" and ">" would cause the <textarea> tag to get confused, so they are converted to "&lt;" and "&gt;" so that they display properly.

Example (normally you would put the following text into a .tpl file on your server and use a web browser to link to it):

<textarea>[Input][fieldName][/Input]</textarea>

Try It!

This context is most often used when you create a form that lets visitors edit (replace a record) with large portions of text in a database field that has carriage returns in it. If you don't use this context, then the lines of text inside the <textarea> multiline input field will appear to have "lost" all the carriage returns that were originally there. That's because web browsers don't understand how to display a "soft-return" character, so it appears as a simple space instead.

Note: there is probably no reason to ever use this context unless it's inside <textarea>, because no other input field allows carriage returns to be typed into it.

Here is a list of exactly what happens to text when it is put inside an [Input] context:

If the letter is...

then it is translated to...

Soft-return (%0B) Hard-return (%0D)
< &lt;
> &gt;
& &amp;
" &quot;
Any other letter no change