0

I have a question about a form created in default.php (product details of virtuemart). Now my action of my form is this:

form name="myform" id="jvcontact95" method="post" action="?php echo JRoute::_('engine.php'); ?>" enctype="multipart/form-data">

And my submit is this:

button class="button-form" name="submitted" type="submit" >Send Request/button>

Now my problem is that when i push on submit joomla load and after this go in a other page with the message "Category not found". And the email from my custom form not arrive.

What is the problem?

Thank you very much for any help.

  • You haven't opened your PHP tag properly....?php >> <?php. Joomla form actions don't work the same way as they do in standalone PHP files. You can't simply use engine.php as your action. Also, JRoute is used to get the SEF URL which cannot be retrieved from a PHP file. I would suggest reading the Joomla Documentation and maybe downloading a contact extension so see how it's done properly ;) – Lodder Apr 16 '16 at 1:22
  • As Lodder said, fix the opening PHP tag. If you want to use engine.php as your form processor your need to attach that file to the Joomla framework and that will allow you to process your form using the default Joomla methods if you have it coded correctly. Don't use JRoute, that does nothing for you unless you are routing back to the same component. view and Itemid with a custom layout as the processor. – Terry Carter Apr 16 '16 at 2:41
  • Hello. Exscuse me but i write php code without open tag beacuse because does not read my code in my post. I understand your response but how i do for connect my form with my custom php form without errors? It's possible this without download joomla extension? Thank you. – Gabriel91 Apr 18 '16 at 7:13

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.