Commit 918cd3c8 authored by Stacey Walker's avatar Stacey Walker
Browse files

ensure only submit/cancel elements can be used (bug: 619266)


Signed-off-by: default avatarStacey Walker <stacey@catalyst.net.nz>
parent 92f647fb
......@@ -39,9 +39,10 @@ function pieform_element_submitcancel(Pieform $form, $element) {/*{{{*/
$form->include_plugin('element', 'submit');
$form->include_plugin('element', 'cancel');
$plugins = array('submit', 'cancel');
$elems = '';
foreach ($element['value'] as $key => $value) {
if (!is_numeric($key)) {
if (!is_numeric($key) && in_array($key, $plugins)) {
$function = 'pieform_element_' . $key;
if (function_exists($function)) {
$item = $element;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment