Populate email in url

Home Forums Quform WordPress Populate email in url

This topic is: not resolved
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #34096
    klurth
    Participant

    Hey Ally,

    I ran into an issue when populating the email address in an url. This is the link I’m using in a notification email for the customer:

    Neue Bestellung – hier klicken

    Unfortunately the link is broken after the email parameter. Am I populating the email in the right way? Or am I missing sth.?

    Two other little questions 🙂
    2) Is there a way to validate a form element in real time? E. g. when inserting not an “@” in the email form there should be an error message.

    3) Empty fields of a form cause an empty paragraph in notifications. Due to that the gaps between the entries in some notifications are very long.

    Thank you in advance, Ally!

    Kind regards,
    Thomas

    • This topic was modified 2 years, 8 months ago by klurth.
    • This topic was modified 2 years, 8 months ago by klurth.
    • This topic was modified 2 years, 8 months ago by klurth.
    • This topic was modified 2 years, 8 months ago by klurth.
    #34101
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #34464
    klurth
    Participant

    Hey Ally,

    sorry to get to you so late. I was able to move the email content from within the form builder to a custom PHP file. Unfortunately now I get an AJAX error when trying to submit the form. If I delete the action from the funtions.php the form is submitted.

    Any idea how to solve the error?

    Best regards,
    Thomas

    #34467
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #34470
    klurth
    Participant

    Hey Ally,

    thanks. This is the code I used in the functions.php:


    add_action('quform_pre_send_notification_53_7', function ($mailer, Quform_Notification $notification, Quform_Form $form) {
    ob_start();
    include __DIR__ . '/email-content.php';
    $mailer->Body = ob_get_clean();
    }, 10, 3);

    53_7 is the unique identifier of the notification.

    And this is the code within the email-conten.php:


    <?php
    $url = 'https://spieren.de/24-stunden-services/rezept-bestellen/';

    $url = add_query_arg(array(
    'vn' => urlencode($form->getValue('quform_53_3')),
    'nn' => urlencode($form->getValue('quform_53_10')),
    'gd' => urlencode($form->getValue('quform_53_11')),
    'em' => urlencode($form->getValue('quform_53_4')),
    'tf' => urlencode($form->getValue('quform_53_13')),
    'vs' => urlencode($form->getValue('quform_53_312')),
    'kk' => urlencode($form->getValue('quform_53_308')),
    'mm1' => urlencode($form->getValue('quform_53_213')),
    'ws1' => urlencode($form->getValue('quform_53_215')),
    'df1' => urlencode($form->getValue('quform_53_216')),
    'pg1' => urlencode($form->getValue('quform_53_223')),
    'mg1' => urlencode($form->getValue('quform_53_268')),
    'mt1' => urlencode($form->getValue('quform_53_273')),
    'ab1' => urlencode($form->getValue('quform_53_274')),
    'zn1' => urlencode($form->getValue('quform_53_275')),
    'am1' => urlencode($form->getValue('quform_53_277')),
    ), $url);
    <h2>Übermittelte Daten</h2>
    <div style="font-family: Arial; margin: 0px!important; padding: 0px!important;">

    Hallo {element|id:3|Vorname} {element|id:10|Nachname},

    wir haben folgende Rezeptbestellung von Ihnen erhalten:

    Neue Bestellung - hier klicken

    </div>
    <div style="font-family: Arial; margin: 0px!important; padding: 0px!important;">

    ">Erneut bestellen

    Viele Grüße,

    Ihr Team der Arztpraxis Spieren


    Im Buchwald 1 | 57482 Wenden
    Telefon: 0 27 62 / 97 57 - 0
    Telefax: 0 27 62 / 97 57 - 57
    eMail: <span style="color: #0066cc;">www.spieren.de/kontakt</span>
    Homepage: <span style="color: #0066cc;">http://www.spieren.de</span>

    Lehrarztpraxis der Universitäten Düsseldorf, Göttingen, Köln und Witten/Herdecke
    ÄKWL-Weiterbildungsstätte zum Facharzt für Allgemeinmedizin
    Gesundheitsförderung & Prävention, hausärztliche Geriatrie und Psychosomatik, Notfallmedizin, Verkehrsmedizin

    BSNR 18 84 711 00

    Facebook: facebook.com/ArztpraxisSpieren
    Instagram: instagram.com/arztpraxisspieren

    </div>
    ?>

    Thank a lot for your help!

    Best regards,
    Thomas

    #34475
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy