Commit b0302b4d authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Don't call the Pieform js function on nonexistent form

parent 65a89921
......@@ -668,8 +668,9 @@ class Pieform {/*{{{*/
// form has been submitted the javascript from the first page load is
// still active in the document
// 2) The form is NOT a JS form, but has a presubmitcallback
if (($this->data['jsform'] && !$this->submitted)
|| (!$this->data['jsform'] && $this->data['presubmitcallback'])) {
if ($outputformtags &&
(($this->data['jsform'] && !$this->submitted)
|| (!$this->data['jsform'] && $this->data['presubmitcallback']))) {
// Establish which buttons in the form are submit buttons. This is
// used to detect which button was pressed to cause the form
// submission
......
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