Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter umea

    (@umea)

    Hi everyone,

    We are still searching for a solution to achieve our main goal (see previous message). It would be really great if someone can provide some help.

    We are looking forward to your response.

    Thanks a lot in advance!

    UMEA

    Thread Starter umea

    (@umea)

    Hi,

    Thank you for your response. We will certainly investigate this option. The main goal for a good solution for us is that customers automatically receive a PDF file in their mailbox after filling in (custom) data on our website and press the submit button.

    Does someone have other suggestions to create this on our website? All kind of suggestions are welcome :).

    Thanks again.

    UMEA

    Thread Starter umea

    (@umea)

    Hey everybody,

    Thank you very much for the response. We tried to change the code wich has to do with CF7 update. It does not work so far. So, do I understand correctly.. when there is an update from CF7 we always have to change the code?

    At the moment, CF7 does not work. CF7 is still running a loop when we press the “send” button. Any other suggestions?

    Does someone know other options or plugins which can create a PDF file after filling in contact form 7 data?

    We hope that someone can help us ??

    Thanks in advance.

    Peter

    Thread Starter umea

    (@umea)

    Hi,

    We would like to come back on the first question in this topic about convert to PDF. We are still working on this issue and we have a question about the connection between the send button and the concerning action (add action) after. We used the code as mentioned above in this topic in our php function. But when we use this code, the send button does not response in combination with the add action option -> “wpcf7_before_send_mail”. It does not work unfortunately.

    We used the following code (see below) and we added the code to functions.php. Besides that, we added the FPDF files to the includes directory of contact-form-7. Maybe we have to move ‘add_action( ‘wpcf7_before_send_mail’, ‘save_application_form’);’ to another function?? Or there is something wrong with the code??

    We hope that someone can help us to solve this problem.

    The code that we used:

    add_action( 'wpcf7_before_send_mail', 'save_application_form');
    
    function save_application_form($cf7) {
    
    /* GET EXTERNAL CLASSES */
    require('https://www.umea.nl/wp-content/plugins/contact-form-7/includes/fpdf.php');
    
    /* example code to generate the pdf */
    $pdf = new FPDF();
    $pdf->AddPage();
    $pdf->SetFont('Arial','B',16);
    $pdf->Write(5,"Hello, World!\n\n\n");
    $pdf->Output('https://www.umea.nl/wp-content/plugins/contact-form-7/includes/file/pdf.pdf', 'F');
    
    /* add  the pdf as attach to the email */
    $cf7->uploaded_files = array ( 'attachedfile' => 'https://www.umea.nl/wp-content/plugins/contact-form-7/includes/file/pdf.pdf' );
    
    }

    Thanks in advance! ??

    Thread Starter umea

    (@umea)

    Thank you for your quick response!

    Well, we aren’t online with our website yet. But we can give you an example of our current situation regarding the input for contact form 7 and how to get fields next to each other.

    Firstly, we have followed your description about the structure within floating divs such as </div>. In both fields -> contact form 7 and CSS field.

    Maybe you can help us further if you see our current situation. I try to explain clearly :).

    This is our input in Contact form 7:

    <div class=”formdiv”>Uw voornaam*
    [text* Uwvoornaam class:uwvoornaam]</div>
    <div class=”formdiv”>Uw achternaam*
    [text* Uwachternaam class:uwachternaam]</div>
    <div class=”formdiv”>Uw email*
    [text* your-email class:uwemail]</div>
    <div class=”formdiv”>Uw leeftijd*
    [text* your-email class:uwleeftijd]</div>
    <div class=”formdiv”>Uw telefoonnummer*
    [tel* number class:uwtelefoonnummer]</div>
    <div class=”formdiv”>besteld op:*
    [date* date class:datum]</div>

    <p>Onderwerp
    [text your-subject class:onderwerp] </p>

    This is our input in CSS Field:

    .formdiv {float:left}
    Input.uwvoornaam{width: 250px;margin-right: 25px;}
    Input.uwemail{width: 250px;}
    input.uwachternaam{width: 250px;margin-right: 25px;}

    .formdiv {float:left}
    Input.uwleeftijd{width: 250px;margin-right: 25px;}
    Input.datum{width: 250px;}
    Input.uwtelefoonnummer{width: 250px;margin-right: 25px;}

    Each “.formdiv” (apply in CSS) represents one row consisting of 3 textfields (where someone can fill in things). So, we have in the current situation 2 rows, each row has 3 different textfields.

    The point is that in this situation the type of letters automatically where changed in a bigger size. Like.. from size 10 to 12. Also “onderwerp” in input contact form 7 is standing automatically next to the first row. We would like to get “onderwerp” automatacillaly below the second row.

    In addition, we hope you can explain to us what you meant with: clear:both removing float elements?

    I hope this is a clear explenation about our current situation. And we hope you can help us further. This is still a difficult issue for us.

    Thanks again! ??

    Thread Starter umea

    (@umea)

    Hello everyone,

    I’m not finished with this issue yet. Can someone help me further with my last question:

    And what do you mean with clear:both removing float elements?

    I have already two rows (each row with 3 coloms) below each other. But the field I would like to have below my second row is standing now next to the first row.

    I would also like to know how I can change the type, when im using formdiv, the type is changing automatically (become bigger)?

    I have done a lot of research about this issue but i’m still trying to solve this problem.

    For some people it is not difficult, but I’m just a beginner ??

    So, I hope someone can help me further.

    Thanks in advance!

    Thread Starter umea

    (@umea)

    Thanks! It works. Now I have 3 textfields next to each other. How can I get another 3 textfields one row down? Now I have this text in contact form 7:

    <div class=”formdiv”>Uw naam*
    [text* your-name class:uwnaam]</div>
    <div class=”formdiv”>Uw email*
    [text* your-email class:uwemail]</div>
    <div class=”formdiv”>Uw achternaam*
    [text* your-name class:uwachternaam]</div>

    <p>Uw leeftijd*
    [text* your-email class:uwleeftijd]</p>

    And this code now I have in CSS:

    .formdiv {float:left}
    Input.uwnaam{width: 250px;margin-right: 50px;}
    Input.uwemail{width: 250px;margin-right: 50px;}
    input.uwachternaam{width: 250px;}

    And what do you mean with clear:both removing float elements?

    Thanks a lot!

    Btw, ik zit in Nederland, jij? ??

    Thread Starter umea

    (@umea)

    Hey Eric,

    Thank you very much for your help. It has not yet succeeded. Soon I go continue with this. I have now another question about working with contact form 7. I know perhaps it’s not a difficult issue for you, but for me it is quite difficult. I’m just a beginner :).

    How can I put two text fields next to each other in contact form 7? (without table format)

    At the moment I have this:

    <p>Uw naam*
    [text* your-name class:uwnaam]</p>

    <p>Uw email*
    [text* your-email class:uwemail]</p>

    I like to have this two sections next to each other.

    I have already completed the following codes to change the width of these two sections (classes):

    Input.uwnaam{width: 250px;}
    Input.uwemail{width: 250px;}

    Thank you very much again! ??

    Thread Starter umea

    (@umea)

    Hey Eric,

    In fact I literally copied your code in the functions.php. I don’t have any knowledge about this at al… Maybe you know if there is an online manual which clearly describes how to work with this? I have tried this already on fpdf.org but unfortunaly didn’t succeed so far.

    Thanks!,

    Peter

    Thread Starter umea

    (@umea)

    Hey Eric,

    I tried to create a PDF as an attached file in the email but it did not succeed with the example you’ve given. It’s the first time I work with php so I don’t have any experience. Do you have any other tips or suggestions which might help?

    Thanks in advance!

    Peter

    Thread Starter umea

    (@umea)

    Thanks a lot with this information Eric! Hope I’ll be able to manage it now.

    Peter

Viewing 11 replies - 1 through 11 (of 11 total)