0

I have a form in Joomla that uses XML:

    <form action="index.php?option=com_content&view=contents" method="post" id="adminForm" name="adminForm">
        <?php $this->form->renderFieldset("visitorDetails") ?>
       <button class="btn btn-primary" type="button" onclick="Joomla.submitbutton('controller.send')" >Send</button>
    </form>

it works fine, the problem is that when i want to change the ID from adminForm to any other name, it won't work. Does Joomla only accept adminForm as ID?

1 Answer 1

1

Most form views in core components have custom Joomla.submitbutton() functions. Standard function does indeed support only adminForm as form ID. Instead you can use Joomla.submitform() and pass your form:

<button class="btn btn-primary" type="button" onclick="Joomla.submitform('controller.send', this.form)" >Send</button>
1
  • Thank you very much for your clarification. Commented Apr 6, 2020 at 13:55

Your Answer

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

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