Modal Form

getData#

Returns: Object

Get key=value object of the modal form fields when the key is name of field and the value is value of field.

onmodal: {
        modalname: {
            save: function($modal, $form)
            {
                 var data = $form.getData();
            }
        }
}

setData#

Arguments:

  • data Object

Set key=value object to the modal form when the key is name of field and the value is value of field.

onmodal: {
        modalname: {
            save: function($modal, $form)
            {
                 $form.setData({ fieldname: value });
            }
        }
}

getField#

Arguments:

  • name String

Returns: Dom Boolean

Get the field of modal form by the name.

onmodal: {
        modalname: {
            save: function($modal, $form)
            {
                 var $field = $form.getField('name');
            }
        }
}

setError#

Arguments:

  • name String

Mark the modal form field with the error class.

onmodal: {
        modalname: {
            save: function($modal, $form)
            {
                 $form.setError('name');
            }
        }
}