• I downloaded a plugin that enables custom PHP code. I can now paste PHP code in any page. But, this line does not work <form action=”contact”> for a custom contact form:

    Page not found. Please try to go back to the homepage.

    Contact is the name of the page. Entering the full path also does not work.
    This does also not work:
    <form name=”contactform” method=”post” action=”<?php echo $_SERVER[‘PHP_SELF’]; ?>”>

    How can I solve this please?
    Please understand I am NOT looking for a plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    I downloaded a plugin that enables custom PHP code.

    Which plugin was that? Knowing that may help understand how to make it work on your site.

    I know that you are not looking for a plugin but please be aware that PHP code is PHP code. It doesn’t add or subtract when you use a plugin (as I’ve said, code is code) but using a plugin does make it easier for you to maintain and manage your WordPress installation.

    Thread Starter DimitriDVV

    (@dimitridvv)

    https://www.ads-software.com/plugins/allow-php-in-posts-and-pages/

    Which plugin do you recommend? I need a text box where I can add some intro text and I need a form with name – email – telephone and anti spam.

    If you want to use php and not use a plugin, then you could put your code into a page template. Then it will be in your theme (hopefully a child theme).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress form with custom PHP code (no plugin)’ is closed to new replies.