===============
close_edit_form
===============

.. js:function:: close_edit_form()

**domain**: client 

**language**: javascript

**class** :doc:`Item class </refs/client/item_api>`

Description
===========

Use ``close_edit_form`` method to close the edit form of the item.


The ``close_edit_form`` method triggers the 
:doc:`on_edit_form_close_query <on_edit_form_close_query>`
event handler of the item, if one is defined. If the event handler is defined 
and 

* returns ``true`` - the form is destroyed, the item's 
  :doc:`edit_form <at_edit_form>`
  atrribute is set to undefined and the methods exits

* return ``false`` - the operation is aborted and the methods exits,

If it don't return a value (undefined) the method triggers the 
:doc:`on_edit_form_close_query </refs/client/group/on_edit_form_close_query>`
of the group that owners the item, if one is defined for the group. If this 
event handler is defined and 

* returns ``true`` - the form is destroyed, the item's 
  :doc:`edit_form <at_edit_form>`
  atrribute is set to undefined and the methods exits

* return ``false`` - the operation is aborted and the methods exits,

If it don't return a value (undefined) the method triggers the 
:doc:`on_edit_form_close_query </refs/client/task/on_edit_form_close_query>`
of the task. If this 
event handler is defined and 

* returns ``true`` - the form is destroyed, the item's 
  :doc:`edit_form <at_edit_form>`
  atrribute is set to undefined and the methods exits

* return ``false`` - the operation is aborted and the methods exits,

If no event handler is defined or none of these event handlers return ``false``, the 
form is destroyed and the item's 
:doc:`edit_form <at_edit_form>`
atrribute is set to undefined.

See also
========

:doc:`Forms </programming/interface/forms>`

:doc:`Visual editing of records </programming/interface/visual_editing>`

:doc:`create_edit_form <m_create_edit_form>`

:doc:`edit_form <at_edit_form>`

