Request Post Transfer Example
In this example, we transfer a post to another page and work with the posted data there...
Please note that you cannot refresh the page after posting. It will come up with an error:
"Form Persistance data no longer available."
Smartsite SXML | Copy Code |
---|---|
{request.form.persistance.transfer()} <se:if expression="request.ispostback()"> <se:then> Title = {request.form(txtTitle)}<br /> Body = {request.form(txtBody)}<br /> </se:then> <se:else> <form method="post" class="CoolForm" action="{request.location()}"> <fieldset> <legend title="Please fill in the form">Enter your data</legend> <label for="txtTitle" title="The title of the thing">Title</label> <input size="77" class="text Required" type="text" id="txtTitle" name="txtTitle"/> <br /> <label for="txtBody" title="The body text">Body</label> <textarea cols="80" rows="5" class="resizable" id="txtBody" name="txtBody"></textarea> <br /> <label></label> <button type="submit">Save</button> </fieldset> </form> </se:else> </se:if> |