

1.
----------------------------------------------------------------------------
| Command     : show_form                                                  |
----------------------------------------------------------------------------
| Description : Displays a given form                                      |
----------------------------------------------------------------------------
| Response    : None                                                       |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| job                 | Name of the job              |                     |
----------------------------------------------------------------------------
| form                | Name of the form             |                     |
----------------------------------------------------------------------------
| updonly             | Yes - only update (if displayed)                   |
|                     | No  - Displays always                              |
----------------------------------------------------------------------------
| updelem             | Name of the element to update| (If updonly=YES)    |
----------------------------------------------------------------------------


2.
----------------------------------------------------------------------------
| Command     : close_form                                                 |
----------------------------------------------------------------------------
| Description : closes a given form                                        |
----------------------------------------------------------------------------
| Response    : None                                                       |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| job                 | Name of the job              |                     |
----------------------------------------------------------------------------
| form                | Name of the form             |                     |
----------------------------------------------------------------------------


3.
----------------------------------------------------------------------------
| Command     : edit_form                                                  |
----------------------------------------------------------------------------
| Description : Changes a given form                                       |
----------------------------------------------------------------------------
| Response    : None                                                       |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| job                 | Name of the job              |                     |
----------------------------------------------------------------------------
| form                | Name of the form             |                     |
----------------------------------------------------------------------------
| elem                | Name of the element          |                     |
----------------------------------------------------------------------------
| value               | Value of the element         |                     |
----------------------------------------------------------------------------
| color               | Color of the element         |                     |
----------------------------------------------------------------------------
| opt_name            | yes  for option name         |                     |
----------------------------------------------------------------------------
| callback            | yes for activate callbacks   |                     |
----------------------------------------------------------------------------


4.
----------------------------------------------------------------------------
| Command     : read_form                                                  |
----------------------------------------------------------------------------
| Description : Returns the value of a form element                        |
----------------------------------------------------------------------------
| Response    : The value of the field unless an out_file is supplied      |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| job                 | Name of the job              |                     |
----------------------------------------------------------------------------
| form                | Name of the form             |                     |
----------------------------------------------------------------------------
| elem                | Name of the element          |                     |
----------------------------------------------------------------------------
| opt_name            | yes  for option name         |                     |
----------------------------------------------------------------------------
| out_file            | a path to a file which will  | if empty, the field |
|                     | be filled by the command     | is ignored.         |
|                     | with the value of the        |                     |
|                     | element. useful to read      |                     |
|                     | multiline text fields.       |                     |
----------------------------------------------------------------------------


5.
----------------------------------------------------------------------------
| Command     : set_form_focus                                             |
----------------------------------------------------------------------------
| Description : Sets the focus to the specific element in the form         |
----------------------------------------------------------------------------
| Response    : None                                                       |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| job                 | Name of the job              |                     |
----------------------------------------------------------------------------
| form                | Name of the form             |                     |
----------------------------------------------------------------------------
| elem                | Name of the element          |                     |
----------------------------------------------------------------------------


6.
----------------------------------------------------------------------------
| Command     : edit_form_list                                             |
----------------------------------------------------------------------------
| Description : Changes a given form with a set of element values          |
|               This call can be used instead of edit_form when a number   |
|               of elements need to be updated at once.                    |
----------------------------------------------------------------------------
| Response    : None                                                       |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| job                 | Name of the job              |                     |
----------------------------------------------------------------------------
| form                | Name of the form             |                     |
----------------------------------------------------------------------------
| opt_name            | yes  for option name         |                     |
----------------------------------------------------------------------------
| in_file             | file that inludes lines of   | Each of the elems is|
|                     | the form :                   | updated             |
|                     |    elem=ELEM,value=VALUE     |                     |
----------------------------------------------------------------------------
| callback            | yes for activate callbacks   |                     |
----------------------------------------------------------------------------


7.
----------------------------------------------------------------------------
| Command     : read_form_list                                             |
----------------------------------------------------------------------------
| Description : Reads a form and returns a file that contains a list of    |
|             : (elem,value) pairs. This call can be used instead of       |
|             : read_form when more than one element needs to be read.     |
----------------------------------------------------------------------------
| Response    : None                                                       |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| job                 | Name of the job              |                     |
----------------------------------------------------------------------------
| form                | Name of the form             |                     |
----------------------------------------------------------------------------
| opt_name            | yes  for option name         |                     |
----------------------------------------------------------------------------
| in_file             | file that inludes lines of   | Each of the elems   |
|                     | the form : elem = ELEM       | will be read        |
|                     |                              |                     |
|                     | <empty string>               | All elems read      |
----------------------------------------------------------------------------
| out_file            | file that inludes lines of   | value of elem e1 is |
|                     | the form :                   | v1 and so on.       |
|                     | set gELEMS  = (e1 e2 e3 .. ) | e1 .. en corresponds|
|                     | set gVALUES = (v1 v2 v3 .. ) | to the in_file list |
----------------------------------------------------------------------------


8.
----------------------------------------------------------------------------
| Command     : create_form                                                |
----------------------------------------------------------------------------
| Description : Creates a new form in the job                              |
----------------------------------------------------------------------------
| Response    : none                                                       |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| form                | Name of the form             |                     |
----------------------------------------------------------------------------


9.
----------------------------------------------------------------------------
| Command     : copy_form                                                  |
----------------------------------------------------------------------------
| Description : Copies forms between jobs                                  |
----------------------------------------------------------------------------
| Response    : None                                                       |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| src_job             | Job to copy from             |                     |
----------------------------------------------------------------------------
| src_form            | form to copy from            |                     |
----------------------------------------------------------------------------
| dst_job             | Job to copy to               |                     |
----------------------------------------------------------------------------
| dst_form            | form to copy to              |                     |
----------------------------------------------------------------------------


10.
----------------------------------------------------------------------------
| Command     : delete_form                                                |
----------------------------------------------------------------------------
| Description : Deletes a form from the job                                |
----------------------------------------------------------------------------
| Response    : none                                                       |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| job                 | Name of the job              |                     |
----------------------------------------------------------------------------
| form                | Name of the form             |                     |
----------------------------------------------------------------------------


11.
----------------------------------------------------------------------------
| Command     : rename_form                                                |
----------------------------------------------------------------------------
| Description : Renames a form within the job                              |
----------------------------------------------------------------------------
| Response    : none                                                       |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| job                 | Name of the job              |                     |
----------------------------------------------------------------------------
| form                | Name of the form             |                     |
----------------------------------------------------------------------------
| new_form            | New name of the form         |                     |
----------------------------------------------------------------------------


12.
----------------------------------------------------------------------------
| Command     : print_form                                                 |
----------------------------------------------------------------------------
| Description : prints a given form                                        |
----------------------------------------------------------------------------
| Response    : None                                                       |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| job                 | Name of the job              |                     |
----------------------------------------------------------------------------
| form                | Name of the form             |                     |
----------------------------------------------------------------------------
| orientation         | auto, portrait, landscape    |                     |
| dest                | printer, file                |                     |
| dest_fname          | <path>                       | when dest=file      |  
| title               | <string (up to 99 chars)>    |                     |
| ncopies             | 1 ... 50                     |                     |
| color               | color,gray,bw                |                     |
| size                | A0, A1, A2, A3, A4, A5, B4, B5, letter, life, custom|
| width               | 0 - 100 inches               | For custom only     |
| height              | 0 - 100 inches               | For custom only     |
| with_title          | No, Yes                      |                     |
| ps_top              | Top margin (inches)          |                     |
| ps_bottom           | Bottom margin (inches)       |                     |
| ps_left             | Left margin (inches)         |                     |
| ps_right            | Right margin (inches)        |                     |
----------------------------------------------------------------------------


13.
----------------------------------------------------------------------------
| Command     : update_form                                                |
----------------------------------------------------------------------------
| Description : updates a given form from the library (if needed and new)  |
----------------------------------------------------------------------------
| Response    : None                                                       |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| job                 | Name of the job              |                     |
----------------------------------------------------------------------------
| form                | Name of the form             |                     |
----------------------------------------------------------------------------


14.
----------------------------------------------------------------------------
| Command     : edit_form_barcode                                          |
----------------------------------------------------------------------------
| Description : updates the barcode of a picture field                     |
|               Only upc39 currently supported                             |
----------------------------------------------------------------------------
| Response    : None                                                       |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| job                 | Name of the job              |                     |
----------------------------------------------------------------------------
| form                | Name of the form             |                     |
----------------------------------------------------------------------------
| elem                | Name of picture element      |                     |
----------------------------------------------------------------------------
| full_ascii          | no/yes                       |                     |
----------------------------------------------------------------------------
| checksum            | no/yes                       |                     |
----------------------------------------------------------------------------
| height              | Height of bar                |  in pixels          |
----------------------------------------------------------------------------
| width               | Width of bar                 |  in pixels          |
----------------------------------------------------------------------------
| bgd_color           | background color             |                     |
----------------------------------------------------------------------------
| fgd_color           | foreground_color             |                     |
----------------------------------------------------------------------------
| text                | text to draw                 |                     |
----------------------------------------------------------------------------
| text_pos            | position of text annotation  |                     |
----------------------------------------------------------------------------
| text_offset         | offset of text annotation    |  in pixels          |
----------------------------------------------------------------------------
| font                | font of text annotation      |                     |
----------------------------------------------------------------------------


15.
----------------------------------------------------------------------------
| Command     : form_callback_editor                                       |
----------------------------------------------------------------------------
| Description : opens the system editor on a given callback script         |
|   NOTE: this is added inorder to control the view->edit option           |
|         of a form according to user priviledge
----------------------------------------------------------------------------
| Response    : None                                                       |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| path                | path to the callback script  |                     |
----------------------------------------------------------------------------


16.
----------------------------------------------------------------------------
| Command     : form_elem_visibility                                       |
----------------------------------------------------------------------------
| Description : sets the specified element as enables/disabled             |
|   NOTE: this command affects only the current view of the form           |
|         it does not change the form definition in the database.
----------------------------------------------------------------------------
| Response    : None                                                       |
============================================================================
| Parameter           | Legal values                 | Comment             |
----------------------------------------------------------------------------
| job                 | Name of the job              |                     |
----------------------------------------------------------------------------
| form                | Name of the form             |                     |
----------------------------------------------------------------------------
| elem                | Name of the element          |                     |
----------------------------------------------------------------------------
| mode                | sensitive,unsensitive,hide   |                     |
|                     | unhide                       |                     |
----------------------------------------------------------------------------
