Input Fields

"It's still web development, it's just way easier!"

How to Use Fields from a Form Submission

This simple form example will pass a value to the (current and same) /forms/inputs.wrival page. Within that requested page it could use the, dynamically created, <#mytext> variable within its content as in the example below. The action form attribute should always be the absolute path to the page that is intended to be returned. To have the form's method be a GET simply do not include the method attribute or set its value to a GET instead of POST. The safe function ensures that the user input will not interupt the HTML flow where it is displayed.

POST Example:

Text Posted: <#postedtext:safe>

<form action="/forms/inputs.wrival" method="POST" name="simpleform">
   Type some text: <input type="text" name="postedtext" value="<#postedtext>">
   <input type="submit" value="Submit">
</form>

Result:

Text Posted:

Type some text:

GET Example:

Text Posted: <#urltext:safe>

<form action="/forms/inputs.wrival" method="GET" name="simpleform">
   Type some text: <input type="text" name="urltext" value="<#urltext>">
   <input type="submit" value="Submit">
</form>

Result:

Text Posted:

Type some text:

System Variable: <#fields>

The system variable <#fields> is a comma separated list of all the field names. This provides a means of doing loop processes on each of them. Each of the field names themselves will return their values. The following is an example of how to use field names and values.

Fields:

<#fields: each="<li><#name> is <#<#name>></li>" tag="ul">

Result: