[Input]Any Text[/Input]
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 "<" and ">" 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):
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.
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) |
| < | < |
| > | > |
| & | & |
| " | " |
| Any other letter | no change |