Jam.py documentation

edit_options

edit_options

domain: client

language: javascript

class Item class

Description

The edit_options attribute is a set of options that determine how the edit form will be displayed on the browser page.

These options are set in the Edit Form Dialog in Application Builder.

You can change edit options in the on_edit_form_created event handler of the item. See example.

edit_options is an object that has the following attributes:

Option

Description

width

the width of the modal form, the default value is 600 px,

title

the title of the form, the default value is the value of a item_caption attribute,

form_border

if true, the border will be displayed around the form

form_header

if true, the form header will be created and displayed containing form title and various buttons

history_button

if true and saving change history is enabled, the history button will be displayed in the form header

close_button

if true, the close button will be created in the upper-right corner of the form

close_on_escape

if true, pressing on the Escape key will execute the close_edit_form method to close the form

edit_details

the list of the detail names, that will be available for editing in the edit form, if edit form template contains the div with class ‘edit-detail’ (the default edit form template have this div)

detail_height

the height of the detail desplayed in the view form, if not specified the height of the detail table is 200px

fields

specify the list of field names that the create_inputs method will use, if fields attribute of its options parameter is not specified

template_class

if specified, the div with this class will be searched in the task templates attribute and used as a form html template when creating a form. This attribute must be set before creating the form

modeless

if set the edit forms will be created modeless, otherwise - modal

Example

function on_edit_form_created(item) {
    item.edit_options.width = 800;
    item.edit_options.close_on_escape = false;
}