1

I'm getting the following error when trying to submit a form using Joomla.submitbutton('book.submit')

The error I get is:

Uncaught TypeError: Cannot set property 'value' of undefined
at Object.Joomla.submitform (core-uncompressed.js?f096f6025f0c22829d968a68944d3145:66)
at Object.Joomla.submitbutton (submitbutton.js:26)
at HTMLButtonElement.onclick (gallery:195)

submitbutton.js line 26:

if (isValid)
{
    Joomla.submitform(task);
    return true;
}

core-uncompressed.js?f096f6025f0c22829d968a68944d3145 line 66:

  if (task) {
        form.task.value = task;
  }

It means that, somehow, the button is empty or something related to this but I do not understand why.

  1. It was perfectly working and now it does not work.

  2. The code has not changed at all.

  3. I have not touched the project in the past 5 days.

  4. It was working when I last checked.

When I went to continue where I left off, I ran into this unpleasant issue.

1

Add task field to the form's HTML.

<input name="task" type="hidden">
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.