Jam.py documentation

enable_edit_form

enable_edit_form()

domain: client

language: javascript

class Item class

Description

Call enable_edit_form to re-enable edit form after prior call to disable_edit_form

Example

function on_edit_form_created(item) {
    var save_btn = item.add_edit_button('Save and continue');
    save_btn.click(function() {
        if (item.is_changing()) {
            item.disable_edit_form();
            item.post();
            item.apply(function(error){
                if (error) {
                    item.alert_error(error);
                }
                item.edit();
                item.enable_edit_form();
            });
        }
    });
}