myForm.remove();

The remove() method is documented as working with the form however when I attempt to use it nothing happens.

My connector is the Form Connector

require_once('dhtmlx/connector/form_connector.php');
	$form = new FormConnector($res);
	$form->render_table("table_name","primary_key","Field_1,Field_1,...,Field_N");

I called myForm.remove(); in the click event of a button and I get no result.

Do you mean myform.reset()?

No, I mean myform.remove();

http://docs.dhtmlx.com/doku.php?id=dhtmlxform:api_toc_categories_form

Sorry for inconvenience, remove method is not available at the production version of dhtmlxForm. It was available in beta version, but not available in current version.

Olga,

Can you advise on how I use a form to delete a record and then reset the form to a blank state?

Unforutnately dhtmlxForm doesn’t have appropriate method to reset form. But you can re-load form from original xml:

form.clear()
form.load(url)

What do you this of this scenario

I have a readonly grid that I use to load my form by passing the record id from a link column to the form using onClick.

so what if I:

  1. use the form connector to load my form

  2. use the gridconnector as the form “dp” to delete the selected by writing a custom functions that passes the delete command and record id to my grid connector.

  3. reset the form. The last step is to reset the form to its original state (the default state of my form is empty with no record loaded) basically the form is in insert mode, it adds and edits records to just fine

If i need only to delete the data in the db?
There is a way to do this?
Like “remove” function!!!