Home › Forums › Quform WordPress › Use global WP-setting as mailadress for conditional mailing
- This topic has 5 replies, 2 voices, and was last updated 11 years ago by Clock1932.
- AuthorPosts
- January 16, 2014 at 10:57 am #8294Clock1932Participant
Hi,
Love QUforms, great product. I think I have a somewhat strange use-case, which requires me to do some customization. I want to to use the conditional mailing setting of a form, to send it to a different mailadress depending on a form-value (3 options). So far so good, no problem there.
Now I want to replace those 3 mailadresses with a WordPress-setting, so that my users can change the adresses easily from a custom settings-page. Where is the PHP-code that deals with the conditional mailing, and if your willing to help, how can I change this to use a WP-setting.
The setting can be accessed from everywhere using the function get_option( “test_setting” );
Thanks!
January 16, 2014 at 11:37 am #8297Clock1932ParticipantFixed it. Changed includes/common.php (line 701)
//$recipients[] = $rule['recipient'];if ($rule['recipient'] == "A@dummy.nl") {
$recipients[] = kc_get_option("AH", "mail", "mail_vk");
}
if ($rule['recipient'] == "B@dummy.nl") {
$recipients[] = kc_get_option("AH", "mail", "mail_va");
}
if ($rule['recipient'] == "C@dummy.nl") {
$recipients[] = kc_get_option("AH", "mail", "mail_v");
}
if ($rule['recipient'] == "Plaza@dummy.nl") {
$recipients[] = kc_get_option("AH", "mail", "mail_plaza");
}
January 16, 2014 at 12:30 pm #8300AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
January 16, 2014 at 12:48 pm #8305Clock1932ParticipantThanks. There is probably no way to do this from the theme functions.php I assume?
January 16, 2014 at 1:06 pm #8306AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
January 16, 2014 at 2:14 pm #8313Clock1932ParticipantGreat. Thanks for the great support!
- AuthorPosts
- You must be logged in to reply to this topic.