• Resolved rinaldo12

    (@rinaldo12)


    Hi there,
    I would like to embed this php form in a WordPress website. For this I wanted to use the plugin: Post Snippets.
    But I am not familiar with it and ask for help on how to put it on.

    Here is the code that is in a normal PHP page.

    <?php require_once ( 'phpFormular/form.php' ); ?>
    <!-- Formular ganz oben einbinden (kein HTML etc. vorher!!) -->
    <!DOCTYPE html>
    <html lang="de">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>PHP Formular Demo</title>
        <link rel="stylesheet" href="demoPage.css">
    
        <!-- CSS & jQuery für das Formular einbinden -->
        <link rel="stylesheet" href="phpFormular/public/css/main.css">
        <script>window.jQuery || document.write('<script src="phpFormular/public/js/jquery-1.9.1.min.js"><\/script>');</script>
    
    </head>
    <body>
        <div id="pageBox">
            <!-- Ausgabe Formular -->
            <?php $formTPL->showReplaced ( FALSE ); ?>
        </div>
    </body>
    </html>

    Best regards

    • This topic was modified 3 years, 1 month ago by rinaldo12.
    • This topic was modified 3 years, 1 month ago by rinaldo12.
Viewing 10 replies - 1 through 10 (of 10 total)
  • A.Tariq

    (@arsalantariq)

    Hi @rinaldo12,

    Thanks for using the plugin,

    You have some errors in the code. <?php require_once ( 'phpFormular/form.php' ); ?> This required file is not including.

    Thanks

    Hi @rinaldo12,

    We haven’t heard from you so we’re going to mark this thread as resolved. Feel free to open a new thread if you need.

    Thanks

    Thread Starter rinaldo12

    (@rinaldo12)

    Hi Tariq,
    Thank you for the feedback/guidance.
    This is what I was told by the seller of the PHP contact form. What is wrong and how do I have to change that? Or is what you wrote above the code I need to put in the plugin? I’m just a user and not a programmer

    • This reply was modified 2 years, 9 months ago by rinaldo12.
    • This reply was modified 2 years, 9 months ago by rinaldo12.
    A.Tariq

    (@arsalantariq)

    Hi @rinaldo12,

    You are using PHP code in the snippets and the code has some errors on line no #01 the file does not exist on the path.

    Thanks

    Thread Starter rinaldo12

    (@rinaldo12)

    Hallo @arsalantariq,
    I have integrated it using <iframe> as follows:

    <iframe src="https://domainname.eu/kontakt.php/" width="100%" height="1550" align="left"
            scrolling="no" marginheight="0" marginwidth="0" frameborder="0">
      <p>Ihr Browser kann leider keine eingebetteten Frames anzeigen</p>
     </iframe>

    It’s all in the directory:
    /website
    /phpformular
    /wp-admin
    /wp-content
    /wp-includes
    index.php
    kontakt.php

    what does the CODE for the “post snippets” have to look like?

    Thanks

    • This reply was modified 2 years, 9 months ago by rinaldo12.
    • This reply was modified 2 years, 9 months ago by rinaldo12.
    A.Tariq

    (@arsalantariq)

    Hi @rinaldo12,

    The code you have shared in the first comment should work fine, you just have to remove starting PHP tag i.e ‘<?php’ as Post Snippets doesn’t need the starting PHP tag also you have to mark the ‘Shortcode’ and ‘ PHP Code’ options.

    Thanks

    Thread Starter rinaldo12

    (@rinaldo12)

    Hi,
    did I understand that correctly?
    So that’s how:<?php require_once ( 'phpFormular/form.php' ); ?>
    Sorry, I’m a user and not a programmer.
    Thanks

    A.Tariq

    (@arsalantariq)

    Hi @rinaldo12,

    Put the code without PHP tags:
    require_once ( 'phpFormular/form.php' );

    Thanks

    Thread Starter rinaldo12

    (@rinaldo12)

    Hallo @arsalantariq,
    do you mean that? require_once (phpFormular/form.php);
    Thanks

    A.Tariq

    (@arsalantariq)

    Hi @rinaldo12,

    Firstly, do not use the PHP tags <?php ?> when using PHP snippet.

    Secondly, you are using the PHP require_one function and passing the file name with the file path. Please make sure that the file that you are requiring is exist on the path.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How do I integrate a PHP form into WP using snippets.’ is closed to new replies.