Form Storage -- Magic Data: Difference between revisions
From IHRIS Wiki
(Created page with '==Features== ==Storage== All the data for form $form is stored in the magic data instance at the path /I2CE/formsData/forms/$form with each node underneath corresponding to an i...') |
|||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
==Features== | ==Features== | ||
Storing form data in magic data is intended to be used in the following situtations: | |||
*centrally maintained data that does not change frequently | |||
*data that you want translations/localizations for | |||
*data that you do not care to track the history of changes | |||
*data that you want to load in easily for a module | |||
==Storage== | ==Storage== | ||
All the data for form $form is stored in the magic data instance at the path | All the data for form $form is stored in the magic data instance at the path | ||
Line 7: | Line 13: | ||
/I2CE/formsData/forms/gender | /I2CE/formsData/forms/gender | ||
we have | we have | ||
F | 'F' => Array [ | ||
'last_modified' => '2009-04-27 1:23:45' | 'last_modified' => '2009-04-27 1:23:45' | ||
'fields' => Array [ | 'fields' => Array [ | ||
Line 13: | Line 19: | ||
] | ] | ||
] | ] | ||
M => Array [ | 'M' => Array [ | ||
'last_modified' => '2009-04-27 1:23:45' | 'last_modified' => '2009-04-27 1:23:45' | ||
'fields' => Array [ | 'fields' => Array [ | ||
Line 19: | Line 25: | ||
] | ] | ||
] | ] | ||
If there is a parent form for the form, it is saved under 'parent' node for form instance. | |||
[[Category:Developer Resources]] |
Latest revision as of 19:09, 1 March 2019
Features
Storing form data in magic data is intended to be used in the following situtations:
- centrally maintained data that does not change frequently
- data that you want translations/localizations for
- data that you do not care to track the history of changes
- data that you want to load in easily for a module
Storage
All the data for form $form is stored in the magic data instance at the path
/I2CE/formsData/forms/$form
with each node underneath corresponding to an instance of the form. For example, under
/I2CE/formsData/forms/gender
we have
'F' => Array [ 'last_modified' => '2009-04-27 1:23:45' 'fields' => Array [ 'name' => 'Female' ] ] 'M' => Array [ 'last_modified' => '2009-04-27 1:23:45' 'fields' => Array [ 'name' => 'Male' ] ]
If there is a parent form for the form, it is saved under 'parent' node for form instance.