Related articles:
dhtmlxForm can be filled data through dhtmlxConnector. All that you need is to create data feed file as
require_once('form_connector.php'); //$conn - database connection, result of mysql_connect $form = new FormConnector($conn); $form->render_table("packages_plain","Id","Package,Version,Size,Maintainer");
And on client side
<form action="" method="post" accept-charset="utf-8" id="my_form"> <div> Package: <input bind="Package" type="text" name="package" value=""> </div> <div> Version: <input bind="Version" type="text" name="version" value=""> </div> <div> Package size: <input bind="Size" type="text" name="size" value=""> </div> <div> Maintainer: <input bind="Maintainer" type="text" name="maint" value=""> </div> </form>
var myForm = new dhtmlXForm("my_form","data.php"); myForm.load(1631);
To save or delete data, myForm.save() and myForm.remove() can be used. No any extra code on server side is necessary.
You can load data from any custom feed instead of connector.
var myForm = new dhtmlXForm("my_form","custom.xml"); myForm.load(1);
and provide the xml as
<data> <Package>acx100-source</Package> <Version>20080210-1.1</Version> <Size>229468</Size> <Maintainer>Stefano Canepa</Maintainer> </data>
Name of top tag is mandatory, child tags must have the same names as names of data-binds.