Skip to content
elclanrs edited this page Aug 24, 2012 · 2 revisions
Option Description Sample
inputs The field is required. This filter only works with text inputs (text, password, textarea). For select menus use exclude to exclude the default option. For radios and checkboxes use min: 1 which will require at least one option to be checked.
Each input can be customized with filters, data, errors and flags.
inputs: {
  // The name attribute of the input in quotes
  'name': {
    filters: 'required min',
    data: { min: 10 },
    errors: { min: 'At least 10 characters' },
    flags: 'noclass noinvalidicon'
  }
}
globalFlags List the flags that you want to apply to all inputs. globalFlags: 'noerror noicons'
onSuccess What happens on submit when the form validates.
onSuccess: function(evt) {
  // Prevent submit to handle AJAX
  evt.preventDefault()
}
onFail What happens on submit when the form does NOT validate. The default submit action is prevented.
onFail: function() {
  $myform.focusFirstInvalid()
}
responsiveAt By default, Ideal Forms will make the form “adaptive”. It will adapt to the container allowing it to work with any responsive grid system.
-auto is the default option.
-false to disable responsiveness
-3000 (or large number) to always show responsive layout
responsiveAt: 480
disableCustom Disables custom inputs and uses system default so you can use other replacement plugins.
-file
-select
-radiocheck
-button
disableCustom: 'file select'
Clone this wiki locally