Commit 791f7472 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Actually make multiplebutton ajax submit work reasonably well now...

parent f8d1a67a
......@@ -783,10 +783,13 @@ class Pieform {
return $function($element, $this);
}
$global = ($this->method == 'get') ? $_GET : $_POST;
if (!empty($element['ajaxmessages']) && isset($global[$element['name']])) {
// If the element is a submit element and has its value in the request, return it
// Otherwise, we don't return the value if the form has been submitted, as they
// aren't normally returned using a standard form.
if (isset($element['value']) && !empty($element['ajaxmessages']) && isset($global[$element['name']])) {
return $element['value'];
}
if (isset($element['value'])) {
else if (isset($element['value']) && (!$this->is_submitted() || (empty($element['ajaxmessages'])))) {
return $element['value'];
}
else if (isset($global[$element['name']]) && $element['type'] != 'submit') {
......
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