• Paul

    (@armstrong698)


    I have embedded some form code that works using a flat HTML file structure.

    At current the submit action is searching for https://current/route/to/contact-test/phpmailersub.php.

    I wish to know where to store the PHPMailer files and how to action them properly. Like I said before the method and code I used previous with a flat HTML file structure worked fantastically, so I must be missing something using a WordPress platform.

    My current code:
    <form class="contact_form" form action="phpmailersub.php" method="post" enctype="multipart/form-data" name="contact_form" onsubmit="return validateForm()">

    Your help would be hugely appreciated! ??

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter Paul

    (@armstrong698)

    @andrew Yeah it was just a suggestion from a guy on the stack wordpress forum it pointed to a bit of template code he told me to put in phpmailersub.php. I just had action=”phpmailersub.php” originally which didnt work either. How do I point it?

    @esmi Its just so simple using normal HTML. That was a suggestion by another member but I really do not have the skills to write a plugin.

    Any other options? I just need form data to send to address A and an auto response with a fixed message and an attached .pdf file.

    Its just so simple using normal HTML.

    Which you are now trying to use in a dynamic content management system. If you cannot write the code yourself, perhaps you could look for a suitable existing plugin?

    Thread Starter Paul

    (@armstrong698)

    @esmi It must be the way the files are structured then.

    Could I not trick it somewhere and give phpmailersub.php the permanent link of: https://damtech.it/demo/etap/wp-content/plugins/phpmailersub.php?

    I guess I could try and find a plugin but it just seemed a shame when I had the exact code write there.

    No – you cannot “trick” WordPress into doing anything reliably.

    Paul, please store your phpmailersub.php file in your theme folder, not in plugin folder ??

    <?php $plugins_url = plugins_url( ‘gs-subscribe-search/subscribe.php’ , dirname(__FILE__) ); ?>
    <form action=”<?php echo $plugins_url ?>” method=”post” enctype=”multipart/form-data”>

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘How to use form action HTML embed via text input and where to store files?’ is closed to new replies.