Home › Forums › Quform WordPress › Populate email in url
- This topic has 5 replies, 2 voices, and was last updated 2 years, 4 months ago by Ally.
- AuthorPosts
- March 15, 2022 at 7:22 am #34096klurthParticipant
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,
ThomasMarch 15, 2022 at 10:37 am #34101AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
July 8, 2022 at 5:32 pm #34464klurthParticipantHey 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,
ThomasJuly 11, 2022 at 10:40 am #34467AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
July 12, 2022 at 6:11 am #34470klurthParticipantHey 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;">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, VerkehrsmedizinBSNR 18 84 711 00
Facebook: facebook.com/ArztpraxisSpieren
Instagram: instagram.com/arztpraxisspieren</div>
?>
Thank a lot for your help!
Best regards,
ThomasJuly 13, 2022 at 9:44 am #34475AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.