The Loop context requires two parameters: Start and End. Looping occurs between (and including) the Start and End value; advancing by 1 each time. You may optionally tell the loop context to advance by a specified amount (other than 1) by using the Advance parameter.
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!
Using the Loop context you can easily create a form to add an arbitrary number of records to a database. The form linking to the page (via a Showpage command for example) can specify the data to add for each record and how many records to add ([numAdd]). If you chose to add three records, the results would look like this:
The following parameters can be used to modify the [Loop] context:
Parameter | Description |
---|---|
Start
|
|
End
|
|
Advance
|
|
The following tags are available inside a [Loop] context:
Tag | Description |
---|---|
[index]
|
Displays the current index number between or including Start and End. |
[break]
|
If the [loop] context sees the [break] tag while executing a loop, it will stop looping, once it finishes the current loop. Thus the [break] tag should only appear in a [showif] statement that is evaluated at the end (bottom) of the loop. |