=================
create_param_form
=================

.. js:function:: create_param_form()

**domain**: client 

**language**: javascript

**class** :doc:`Report class </refs/client/report_api>`

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

The ``create_param_form`` method is called by the 
:doc:`print <m_print>`
method to create a form to set report parameters before sending a request to 
the server by the
:doc:`process_report <m_process_report>`
method.

The method checks if javascript modules of the report and its owner are loaded,
and if not (the
:doc:`Dynamic JS modules loading parameter </admin/project/parameters>`
is set) then loads them.

Then it searches for the report html template in the task 
:doc:`templates </refs/client/task/at_templates>`
attribute (See 
:doc:`Forms </programming/interface/forms>`
) and creates a 
clone of the template and assigns it to the report 
:doc:`param_form <at_param_form>`
attribute.

Creates a form and appends the html to it.

Triggers the 
:doc:`on_param_form_created </refs/client/task/on_param_form_created>`
of the task.

Triggers the 
:doc:`on_param_form_created </refs/client/reports/on_param_form_created>`
of the report group, if one is defined.

Triggers the 
:doc:`on_param_form_created <on_param_form_created>`
of the report, if one is defined.

Shows the form. Before showing the form the method applies 
options specidied in the 
:doc:`param_options <at_param_options>`
attribute.

Triggers the 
:doc:`on_param_form_shown </refs/client/task/on_param_form_shown>`
of the task.

Triggers the 
:doc:`on_param_form_created </refs/client/reports/on_param_form_shown>`
of the report group, if one is defined.

Triggers the 
:doc:`on_param_form_shown <on_param_form_shown>`
of the report, if one is defined.

See also
========

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

:doc:`Client-side report programming </programming/reports/client_side_programming>`

:doc:`print <m_print>`

