Matching the form layout in your email or PDF output

Home Forums Quform WordPress Matching the form layout in your email or PDF output

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

    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.
    #32533
    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.

    #32559
    quezmedia
    Participant

    so 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.
    #32567
    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.

    #32576
    quezmedia
    Participant

    we 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.

    #32580
    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