Deprecation: #109102 - FormEngine "additionalHiddenFields" key
See forge#109102
Description
The additional result array key in FormEngine was a legacy
mechanism that stored hidden
<input> HTML strings separately from the
main html key. This indirection is no longer needed — elements can simply
add their hidden fields to the html key directly.
The following have been deprecated:
- The
additionalkey in FormEngine result arraysHidden Fields FormResult::$hidden Fields Html FormResult Collection:: get Hidden Fields Html ()
Impact
Third-party FormEngine elements that add entries to
php:$result will trigger a PHP
E_ level error when their result is merged via
Abstract.
Affected installations
Installations with custom FormEngine elements or containers that populate the
additional result array key.
Migration
Move hidden field HTML from additional into the html key
directly.
Before:
$resultArray = $this->initializeResultArray();
$resultArray['additionalHiddenFields'][] = '<input type="hidden" name="myField" value="myValue" />';
After:
$resultArray = $this->initializeResultArray();
$resultArray['html'] .= '<input type="hidden" name="myField" value="myValue" />';