Home › Forums › Quform WordPress › Matching the form layout in your email or PDF output
- This topic has 5 replies, 2 voices, and was last updated 3 years, 9 months ago by Ally.
- AuthorPosts
- February 11, 2021 at 3:17 pm #32529quezmediaParticipant
My client is requesting that notifications match the on screen layout for forms. Is this possible?
example being this form looking just like the page in the notification
https://martindaleco.com/quote-request/
Attachments:
You must be logged in to view attached files.February 12, 2021 at 10:32 am #32533AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
February 16, 2021 at 1:41 pm #32559quezmediaParticipantso I have tried web merge. and I am getting an issue where not all fields are being mapped. When we try fetching the fields using qu from predefined functions all fields are not mapping.
We are not able to capture dynamic filed values containing catalog number, catalog quantity and catalog description. We are getting only first two rows of catalog.
here is my code:
add_action(‘quform_post_process_2’, function (array $result, Quform_Form $form) {
$url = ‘https://www.webmerge.me/merge/703341/1aplhb’;$values = array();
foreach ($form->getRecursiveIterator() as $element) {
if ($element instanceof Quform_Element_Field) {
$values[$element->getName()] = $element->getValue();
}
}
print_r($values);exit;$data = array(
‘Body’ => $form->getValues(),
);$args = array(
‘body’ => $data
);wp_remote_post($url, $args);
return $result;
}, 10, 2);Attachments:
You must be logged in to view attached files.February 17, 2021 at 11:15 am #32567AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
February 23, 2021 at 4:37 pm #32576quezmediaParticipantwe are getting closer now. Need help with the following:
I am able to create PDF by custom code as the required structure. But I am stuck in sending the generated pdf file as attachment into the email notification. Can you please post a support ticket and ask how can we attach a file inside this hook.
add_action(‘quform_pre_send_notification_2_2’, function ($mailer, Quform_Notification $notification, Quform_Form $form) {
ob_start();
include _DIR_ . ‘/email-content.php’;$mailer->Body = ob_get_clean();
}, 10, 3);I was trying this $notification->setConfig(‘attachments’,array(0 => _DIR_ . ‘/Document.pdf’));Please ask them what is the right way.
February 24, 2021 at 10:39 am #32580AllySupport 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.