setup()
Call this method to initialize a new form. Use the close() method to finish the forms definition. Use display() to show form. For detailed information on how to setup a form see our Formulare erstellen examples.
string setup( string handle [, string action [, string method = POST [, bool upload = true [, array values ]]]])
Return
Buffers and returns initial HTML code.
Parameter
Description
handleHandle name to address form.
actionCall this link upon submission of the form. This can be a link as well as a hash/anchor.
methodPOST or GET
uploadPrepare form for file upload. The default value is TRUE which means that you have to explicitly define that a form is unable to receive uploaded files.
valuesSet form's initial values. This parameter can be used to fill the form's input boxes with values from a table.
Setup form
$FORM->setup("testform")
RETURN: '<div id="frm_testform" class="frm_testform form testform">
<form enctype="multipart/form-data" id="testform" method="POST" action="">
<div><input type="hidden" name="sys__testform" value="true" /></div>
<script type="text/javascript">function ...
Error: Formname already exists
$FORM->setup("testform")
RETURN: ''
Get form to call different page on sent event
$FORM->setup("testform1", $NAVI->href(20), "GET")
RETURN: '<div id="frm_testform1" class="frm_testform1 form testform1">
<form enctype="multipart/form-data" id="testform1" method="GET" action="/api/user/login">
'