Saving Data Changes Made in Form

You can use the connectors for simple form saving. The connectors will recognize and automatically execute CRUD operations for the following patterns:

  • Get data for some record in DB by id

    GET: connector.php?action=get&id={some}

    Returns: data in 'json'(if you use JSONDataConnector) or 'xml'(if you use DataConnector) format.

  • Delete data for some record in DB by id

    GET: connector.php?action=delete
    POST: id={some}

    Returns: "true" as string, when an operation is executed correctly.

  • Update data for some record in DB by id

    GET: connector.php?action=delete
    POST: id={some}&property_name={value}

    Returns: "true" as a string, when operation is executed correctly.

  • Insert data in DB

    GET: connector.php?action=insert
    POST: property_name={value}

    Returns: "true\n{new id}" as a string when operation is executed correctly.

Basically, for DHTMLX Touch components to save data you can use the following code:

dhx.ajax().post("connector.php?action=insert", $$('form').getValues());
Back to top