SrGato29
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form DB] Email trick for testing multiple emailsI have multiple emails, like
value1|somebody@gmail.com
value2|somebody@gmail.com
value3|test@gmail.comI know that I have to use this:
value1|somebody+email1@gmail.com
value2|somebody+email2@gmail.com
value3|test@gmail.comso that way I’will receive the correct value, but I don’t want to do that because in my email is like:
to: somebody+email1@gmail.com instead of somebody@gmail.com
the same thing happens in my contact db tableThere is a way to fix that , so that way I will use this somebody@gmail.com instead of somebody+email1@gmail.com
Forum: Plugins
In reply to: [Contact Form DB] Email trick for testing multiple emailsIs there a way to not use “+” when there are multiple emails?
Forum: Plugins
In reply to: [Contact Form DB] Email trick for testing multiple emailsMmmm Im using the lastest code, but Im repeating some emails, I know that I have to use emaiexample+test1@test.com the symbol “+” to differenciate the emails so that way I will not the receive the wrong values, but I saw this code in your page
Array ( [0] => Array ( [type] => select [basetype] => select [name] => location [options] => Array ( ) [raw_values] => Array ( [0] => location1|email1@nowhere.com [1] => location2|email2@nowhere.com [2] => location3|email3@nowhere.com ) [values] => Array ( [0] => location1 [1] => location2 [2] => location3 ) [pipes] => WPCF7_Pipes Object ( [pipes:WPCF7_Pipes:private] => Array ( [0] => WPCF7_Pipe Object ( [before] => location1 [after] => email1@nowhere.com ) [1] => WPCF7_Pipe Object ( [before] => location2 [after] => email2@nowhere.com ) [2] => WPCF7_Pipe Object ( [before] => location3 [after] => email3@nowhere.com ) ) ) [labels] => Array ( [0] => location1 [1] => location2 [2] => location3 ) [attr] => [content] => ) [1] => Array ( [type] => submit [basetype] => submit [name] => [options] => Array ( ) [raw_values] => Array ( [0] => Send ) [values] => Array ( [0] => Send ) [pipes] => WPCF7_Pipes Object ( [pipes:WPCF7_Pipes:private] => Array ( [0] => WPCF7_Pipe Object ( [before] => Send [after] => Send ) ) ) [labels] => Array ( [0] => Send ) [attr] => [content] => ) )I changed some values to work with my form but it didnt work, I dont want to see the value after the + symbol
Forum: Plugins
In reply to: [Contact Form DB] Email trick for testing multiple emailsmmm ok I’ll try it 😀
Forum: Plugins
In reply to: [Contact Form DB] Email trick for testing multiple emailsSo in the code above , I have to change “radio” for “select” ? only that?
Forum: Plugins
In reply to: [Contact Form DB] Get the second valueoh thanks a lot!!! that works 😀
Forum: Plugins
In reply to: [Contact Form DB] Get the second valueAlso Im using a radio button….
Forum: Plugins
In reply to: [Contact Form DB] Get the second valuealso I comment the lines that you said and It did not work, my forms are :
[contact-form-7 id=”56773″ title=”Trámites ante entidades públicas y privadas”]
[contact-form-7 id=”56758″ title=”Trámites ante la oficina AFSDP”]Forum: Plugins
In reply to: [Contact Form DB] Get the second valueMmm it still doesnt work…
the first function is
function form_with_pipes_handler($formName, $fieldName, $newFieldName, &$formData) { if ($formData && $formName == $formData->title && property_exists($formData, 'WPCF7_ContactForm') && method_exists($formData->WPCF7_ContactForm, 'form_scan_shortcode')) { $scanned_form_tags = $formData->WPCF7_ContactForm->form_scan_shortcode(); $emailSelected = $formData->posted_data[$fieldName]; $valueSelected = null; foreach ($scanned_form_tags as $tag) { if ($tag['name'] == $fieldName) { foreach ($tag['raw_values'] as $rawValue) { // value|email $valuesArray = explode('|', $rawValue); if (count($valuesArray) == 2 && $valuesArray[1] == $emailSelected) { $valueSelected = $valuesArray[0]; break; } } } if ($valueSelected != null) { break; } } if ($valueSelected != null) { $formData->posted_data[$fieldName] = $valueSelected; $formData->posted_data[$newFieldName] = $emailSelected; } } return $formData; }then
function location_form_handler($formData) { $formName = 'Trámites ante la oficina AFSDP'; // change this to your form's name $fieldName = 'your-recipient'; // change this to your field's name $newFieldName = $fieldName . '_email'; return form_with_pipes_handler($formName, $fieldName, $newFieldName, $formData); } add_filter('cfdb_form_data', 'location_form_handler');then
function location_form_handler_form2($formData) { $formName = 'Trámites ante entidades públicas y privadas'; // change this to your form's name $fieldName = 'tramiteprivadapublico'; // change this to your field's name $newFieldName = $fieldName . '_email'; return form_with_pipes_handler($formName, $fieldName, $newFieldName, $formData); } add_filter('cfdb_form_data', 'location_form_handler_form2');They has a check in “Activated and Execute also on dashboard pages”,
I have contact form version 4.4 and contact form db 2.10.1, What else can I do?
Forum: Plugins
In reply to: [Contact Form DB] Get the second valuefunction form_with_pipes_handler($formName, $fieldName, $newFieldName, &$formData) { if ($formData && $formName == $formData->title && property_exists($formData, 'WPCF7_ContactForm') && method_exists($formData->WPCF7_ContactForm, 'form_scan_shortcode')) { $scanned_form_tags = $formData->WPCF7_ContactForm->form_scan_shortcode(); $emailSelected = $formData->posted_data[$fieldName]; $valueSelected = null; foreach ($scanned_form_tags as $tag) { if ($tag['name'] == $fieldName) { foreach ($tag['raw_values'] as $rawValue) { // value|email $valuesArray = explode('|', $rawValue); if (count($valuesArray) == 2 && $valuesArray[1] == $emailSelected) { $valueSelected = $valuesArray[0]; break; } } } if ($valueSelected != null) { break; } } if ($valueSelected != null) { $formData->posted_data[$fieldName] = $valueSelected; $formData->posted_data[$newFieldName] = $emailSelected; } } return $formData; } add_filter('cfdb_form_data', 'location_form_handler');function location_form_handler($formData) { $formName = 'Trámites ante la oficina AFSDP'; // change this to your form's name $fieldName = 'your-recipient'; // change this to your field's name $newFieldName = $fieldName . '_email'; return form_with_pipes_handler($formName, $fieldName, $newFieldName, $formData); }This is my code, but it doesnt work, mm I have 2 forms on the same page, and in both of them I’m using the pipes, but with only one I used the functions and it doesnt work :c
Forum: Plugins
In reply to: [Contact Form DB] Get the second valueMMM I use the code with the plugin https://wordpress.org/plugins/add-actions-and-filters/ but it doesnt work my cod is function location_form_handler($formData)
{
$formName = ‘Trámites ante la oficina AFSDP’; // change this to your form’s name
$fieldName = ‘your-recipient’; // change this to your field’s name
$newFieldName = $fieldName . ‘_email’;
return form_with_pipes_handler($formName, $fieldName, $newFieldName, $formData);
}function form_with_pipes_handler($formName, $fieldName, $newFieldName, &$formData)
{
if ($formData &&
$formName == $formData->title &&
property_exists($formData, ‘WPCF7_ContactForm’) &&
method_exists($formData->WPCF7_ContactForm, ‘form_scan_shortcode’)) {$scanned_form_tags = $formData->WPCF7_ContactForm->form_scan_shortcode();
$emailSelected = $formData->posted_data[$fieldName];
$valueSelected = null;
foreach ($scanned_form_tags as $tag) {
if ($tag[‘name’] == $fieldName) {
foreach ($tag[‘raw_values’] as $rawValue) {
// value|email
$valuesArray = explode(‘|’, $rawValue);
if (count($valuesArray) == 2 && $valuesArray[1] == $emailSelected) {
$valueSelected = $valuesArray[0];
break;
}
}
}
if ($valueSelected != null) {
break;
}
}
if ($valueSelected != null) {
$formData->posted_data[$fieldName] = $valueSelected;
$formData->posted_data[$newFieldName] = $emailSelected;
}
}
return $formData;
}add_filter(‘cfdb_form_data’, ‘location_form_handler’);
it’s activated and it has a check in “Execute also on Dashboard Pages” but I can see the changes
Forum: Plugins
In reply to: [Contact Form 7] Divide Radio buttonOh thanks a lot, it works !! 😀
Forum: Plugins
In reply to: [Contact Form DB] Get the second valueOh thanks a lot,
function location_form_handler($formData)
{
$formName = ‘Pipes’; // change this to your form’s name
$fieldName = ‘location’; // change this to your field’s name
$newFieldName = $fieldName . ‘_email’;
return form_with_pipes_handler($formName, $fieldName, $newFieldName, $formData);
}
What can I do if I have more than one form with pipes? I have to create more functions?Forum: Plugins
In reply to: [WP RSS Multi Importer] Fatal Error on InstallHi there,
Im receiving the same error,and I have the same plugins, help me please.
Thanks in advance
Forum: Plugins
In reply to: [Custom Post Type UI] Adding TemplatesHi there,
I added a template for the posts, but when I add a template for my custom taxonomy, It leads me to a 404 error page, I only can see the terms, for example:http://www.page.com/customtaxonomy = Error 404
http://www.page.com/customtaxonomy/term1 = Display content (with its template taxonomy-customtaxonomy.php)So I hope you could help me please.
Thanks in advance