Home › Forums › Quform WordPress › Quform Custom Code plugin not working
- This topic has 8 replies, 5 voices, and was last updated 6 years, 1 month ago by Ally.
- AuthorPosts
- April 13, 2017 at 4:28 pm #21107productidParticipant
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 belowfunction 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');April 18, 2017 at 11:05 am #21117AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
September 25, 2017 at 5:08 am #22242jkortumParticipantI am having the same problem, is there a fix for it yet?
September 25, 2017 at 9:54 am #22244AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
February 22, 2018 at 12:04 am #24423pinkcaviarParticipantHi, I am also looking to activate the Quform Custom Code plugin but cannot locate it in my wordpress install. Can you please help?
February 22, 2018 at 4:27 am #24424castingdeptParticipantI am having some serious issues with my plugin – this upgrade is a problem … can you make a link for use to get qform back ?
February 23, 2018 at 7:14 pm #24448AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
February 23, 2018 at 7:15 pm #24449AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
February 28, 2018 at 10:43 am #24491AllySupport 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.