From 6b71724f1a0e1398b7b5170debdf7a735cb7e403 Mon Sep 17 00:00:00 2001 From: Joris Tirado Date: Mon, 19 Jan 2015 15:18:34 -0800 Subject: [PATCH] UI-943: Add documentation for the getFormData() method --- docs/monster/ui.md | 4 +++- docs/monster/ui/getFormData().md | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 docs/monster/ui/getFormData().md diff --git a/docs/monster/ui.md b/docs/monster/ui.md index a8134c86e..30bd67442 100644 --- a/docs/monster/ui.md +++ b/docs/monster/ui.md @@ -8,6 +8,7 @@ The `monster.ui` object contains different methods and objects used to easily re * [protectField()][protect_field] * [validate()][validate] * [wysiwyg()][wysiwyg] +* [getFormData()][getFormData] ### Objects * [prettyCheck][pretty_check] @@ -23,4 +24,5 @@ The `monster.ui` object contains different methods and objects used to easily re [dialog]: ui/dialog().md [protect_field]: ui/protectField().md [validate]: ui/validate().md -[wysiwyg]: ui/wysiwyg().md \ No newline at end of file +[wysiwyg]: ui/wysiwyg().md +[getFormData]: ui/getFormData().md \ No newline at end of file diff --git a/docs/monster/ui/getFormData().md b/docs/monster/ui/getFormData().md new file mode 100644 index 000000000..9bd2ba90d --- /dev/null +++ b/docs/monster/ui/getFormData().md @@ -0,0 +1,21 @@ +# [monster][monster].[ui][ui].getFormData() + +* [Syntax](#syntax) +* [Parameters](#parameters) +* [Description](#description) + +### Syntax +```javascript +monster.ui.getFormData(rootNode[, delimiter, skipEmpty, nodeCallback, useIdIfEmptyName]); +``` + +### Parameters +The parameters are the same than the [form2js][form2js] function. + +### Description +This method is a wrapper of the form2js function. Its goal is to clean the object returned by form2js of all empty keys when the form passed as a parameter contains inputs without a `name` parameter. + +[monster]: ../../monster.md +[ui]: ../ui.md + +[form2js]: https://github.com/maxatwork/form2js#form2js \ No newline at end of file