Create a Formular
You can create a Formular with
- Standard-HTML (very complex)
- shtml.form-Function. See form. Simpe and flexible
- shtml.sqltable: Very simple
You can create post- and ajax-formulars
post-Formular with Standard-HTML
[html]
<form name="f" method="post">
<table>
<tr><td>Name</td><td>input type="text" name="col_name" value="@var:col_name@"></td></tr>
<tr><td>Info</td><td>input type="textarea" cols="50" rows="5" name="col_info" value="@var:col_info@"></td></tr>
</table>
<input type="hidden" name="requesttype" value="update">
<input type="submit" name="updatebutton" value="@t=Save@>"
</form>
[/html]
with @var:colname@ you can refill the Data
width hidden-object "requesttype" you can set the requesttype
Simple Version with form-Function
// use form-Function
shtml=form=start
shtml=form=input=Name=col_name
shtml=form=textarea=Info=col_info
// Save: set Request-Type to "update"
shtml=form=update=update
shtml=end
shtml=ajax=myajax=myajax
[html]
<form name=ordertime method="post">
<table>
<tr><td>Barcode</td><td><input type="text" name="col_barcode" value="@var:col_barcode@">
-- set link to the ajax-function:
<a id=link href="javascript:workorderlist_start('getresult',document.getElementsByName('col_barcode')[0].value)">@t=Search@</a>
--
<tr><td>Info</td><td>input type="textarea" cols="50" rows="5" name="col_info" value="@var:col_info@"></td></tr>
</table>
<input type="hidden" name="requesttype" value="update">
<input type="submit" name="updatebutton" value="@t=Save@>"
</form>
<br>
-- in this area beas will display the result
shtml=html=</br><p id="myajax"> </p>
[/html]
Ajax-Area
if <ajaxcommand> = getresult then
shtml=html=Your barcode: @ajaxparameter@
end if