Quform Custom Code plugin not working

Home Forums Quform WordPress Quform Custom Code plugin not working

This topic is: not resolved

This topic contains 3 replies, has 3 voices, and was last updated by  Ally 2 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #21107

    productid
    Participant

    I have created a custom plugin (below), saved it as a quform-custom-code.php, created a folder named the same in my plugins directory and uploaded the file. The plugin does not show up and I can not activate in the wordpress plugins page.

    <?php
     
    /*
     * Plugin Name: Quform Custom Code
     * Description: Custom code for Quform.
     * Version: 1.0
     */
     
    // Paste in your custom code below

    function my_send_form_emails($form)
    {
        // Hide these fields
        $form->getElement('iphorm_6_25')->setIsHidden(true);
        $form->getElement('iphorm_6_29')->setIsHidden(true);
        $form->getElement('iphorm_6_27')->setIsHidden(true);
    $form->getElement('iphorm_6_28')->setIsHidden(true);
    $form->getElement('iphorm_6_30')->setIsHidden(true);
    $form->getElement('iphorm_6_31')->setIsHidden(true);
    $form->getElement('iphorm_6_32')->setIsHidden(true);
    $form->getElement('iphorm_6_33')->setIsHidden(true);
    $form->getElement('iphorm_6_34')->setIsHidden(true);
    $form->getElement('iphorm_6_35')->setIsHidden(true);
    $form->getElement('iphorm_6_36')->setIsHidden(true);
    $form->getElement('iphorm_6_37')->setIsHidden(true);
    $form->getElement('iphorm_6_38')->setIsHidden(true);
    $form->getElement('iphorm_6_39')->setIsHidden(true);
    $form->getElement('iphorm_6_40')->setIsHidden(true);
    $form->getElement('iphorm_6_41')->setIsHidden(true);
    $form->getElement('iphorm_6_42')->setIsHidden(true);
    $form->getElement('iphorm_6_43')->setIsHidden(true);
    $form->getElement('iphorm_6_44')->setIsHidden(true);
    $form->getElement('iphorm_6_45')->setIsHidden(true);
    $form->getElement('iphorm_6_46')->setIsHidden(true);
    $form->getElement('iphorm_6_47')->setIsHidden(true);
    $form->getElement('iphorm_6_48')->setIsHidden(true);

        $mailer = iphorm_new_phpmailer($form);

        // Set subject
        $mailer->Subject = 'New form submission';

        // Set recipient
        $mailer->addAddress('drudolph@gesnetwork.com');

        // Set "From" address
        $mailer->setFrom('drudolph@gesnetwork.com');

        ob_start();
        include IPHORM_INCLUDES_DIR . '/emails/email-html.php';
        $emailHTML = ob_get_clean();

        ob_start();
        include IPHORM_INCLUDES_DIR . '/emails/email-plain.php';
        $emailPlain = ob_get_clean();

        $mailer->MsgHTML($emailHTML);
        $mailer->AltBody = $emailPlain;

        try {
            // Send the message
            $mailer->Send();
        } catch (Exception $e) {
            if (WP_DEBUG) {
                throw $e;
            }
        }
    }
    add_action('iphorm_post_process_6', 'my_send_form_emails');

    #21117

    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.

    #22242

    jkortum
    Participant

    I am having the same problem, is there a fix for it yet?

    #22244

    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 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.