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 Answer 1

1

Add task field to the form's HTML.

<input name="task" type="hidden">
1
  • Also the form token has disappeared. Commented Apr 26, 2020 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.