Ticket #10 (new enhancement)
Please change formicula so that it's forms post data objects/arrays
| Reported by: | rgasch | Owned by: | Landseer |
|---|---|---|---|
| Priority: | major | Milestone: | not yet defined |
| Version: | Severity: | high severity | |
| Keywords: | Cc: |
Description
Currently formicula forms post individual fields. If this were to be changed to post an array of fields, extending formicula forms for custom uses, would be much easier. This would be an easy change to make and would make formicula much easier to extend.
Currently formicula_user_send() does the following:
$uduname? = FormUtil::getPassedValue('uname', (isset($argsuname?)) ? $argsuname? : , 'GETPOST');
$uduemail? = FormUtil::getPassedValue('uemail', (isset($argsuemail?)) ? $argsuemail? : , 'GETPOST');
$udurl? = FormUtil::getPassedValue('url', (isset($argsurl?)) ? $argsurl? : , 'GETPOST');
$udphone? = FormUtil::getPassedValue('phone', (isset($argsphone?)) ? $argsphone? : , 'GETPOST');
$udcompany? = FormUtil::getPassedValue('company', (isset($argscompany?)) ? $argscompany? : , 'GETPOST');
$udlocation? = FormUtil::getPassedValue('location', (isset($argslocation?)) ? $argslocation? : , 'GETPOST');
$udcomment? = FormUtil::getPassedValue('comment', (isset($argscomment?)) ? $argscomment? : , 'GETPOST');
Would it not be much easier to do
$ud = FormUtil::getPassedValue ('userdata', array(), 'GETPOST');
and then do
This would allow you to extend the posted values without having to worry about them being captured from POST. Any extensions with new fields could then be handled only by templates.
I've just seen that square brackets are not correctly displayed by in the examples above. I think/hope it's still clear what I mean though.
