diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 000000000..5c3324d31 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,8 @@ +{ + "singleQuote": true, + "trailingComma": "all", + "printWidth": 120, + "semi": false, + "arrowParens": "avoid", + "spaceAfterFunction": false +} diff --git a/docs/formBuilder/options/persistDefaultFields.md b/docs/formBuilder/options/persistDefaultFields.md new file mode 100644 index 000000000..c35743b00 --- /dev/null +++ b/docs/formBuilder/options/persistDefaultFields.md @@ -0,0 +1,25 @@ +# persistDefaultFields + +When `persistDefaultFields` is enabled, `defaultFields` defined in the formBuilder options will not be removed when clearing all fields. + +## Usage + +```javascript +var options = { + defaultFields: [ + { + className: 'form-control', + label: 'Default Field', + placeholder: 'Enter your default field value', + name: 'default-field-1', + type: 'text', + }, + ], + persistDefaultFields: true, +} +$(container).formBuilder(options) +``` + +## See it in Action + +