John Huebner
Forum Replies Created
-
Forum: Plugins
In reply to: [Dynamic Select for Contact Form 7] Categories to dropdownThis part should be located in functions.php with your function instead of in the form
add_filter('list-of-categories', 'wt_category_list', 10, 2);I just did a quick test with just the current version CF7 and this plugin installed and I’m not seeing any errors.
The line number where the error is being reported still has me a bit confused. At one time I attempted to keep this plugin compatible with CF7 version 3, which had a different way of invalidating a field.
You may have already done this, but you might want to try reinstalling the most current version of this plugin while your testing. If you figure out what else might be causing it I’d be interested in hearing about it if there’s something I can do to correct it.
I don’t see anything at line 194 that should cause this.
Is this happening only when validation fails, for example when the field is required and nothing is selected? Or does it happen every time.
Forum: Plugins
In reply to: [Dynamic Recipient for Contact Form 7] Help with argumentsI’ll make a not to make the example instructions more clear. I’ve also made a note to make the instructions here more clear as well.
As far as the errors, turn on php error display on your site and that will probably tell you what’s wrong. It’s likely a syntax error, missing ; or something like that.
Forum: Plugins
In reply to: [Dynamic Recipient for Contact Form 7] Help with argumentsI just noticed that you’re using my example file. By default this file is not actually included anywhere. Did you copy those functions to your functions.php file.
The example file will get overwritten then next time I update the plugin.
Forum: Plugins
In reply to: [Dynamic Recipient for Contact Form 7] Help with argumentsDo you have an ACF add on installed that adds hidden fields? You will need to use either my hidden field plugin https://wordpress.org/plugins/contact-form-7-simple-hidden-field/ or the dynamic text extension https://wordpress.org/plugins/contact-form-7-dynamic-select-extension/
Forum: Plugins
In reply to: [Dynamic Recipient for Contact Form 7] Help with argumentsThis field gives the name of the filter. The name of the field must be “dynamic-mail-to-filter”. The value of the field is the name of the filter hook.
[simplehidden dynamic-mail-to-filter "dynamic-to-from-filter-hook"]This is the field that specifies the additional field values to pass to the filter. The name of this field must be “dynamic-mail-to-fields”. The value of this field is a comma separated list of field names.
[simplehidden dynamic-mail-to-fields "field1,field2,field3"]Forum: Plugins
In reply to: [Dynamic Recipient for Contact Form 7] Help with argumentsTo use two field in my example above I would create a hidden field that looked like this.
[simplehidden dynamic-mail-to-fields "field-name-1,field-name-2,field-name-3"]This will pass an array of argument to the filter function that looks something like this.
$args = array( 'field-name-1' => 'value of field 1', 'field-name-2' => 'value of field 2', 'field-name-3' => 'value of field 3' );Then you’d use those values to return the email correct email address
add_filter('dynamic-to-from-values', 'my_dynamic_to'), 10, 2); function my_dynamic_to($recipient, $args=array()) { if ((isset($args['field-name-2']) && intval($args['field-name-2'] > 20000) || (isset($args['field-name-3']) && intval($args['field-name-3']) > 40000) || (isset($args['field-name-1']) && intval($args['field-name-1) > 100000)) { $recipient = 'email1'; } else { $recipient = 'email2'; } return $recipient; }Forum: Plugins
In reply to: [Dynamic Recipient for Contact Form 7] Help with argumentsHi,
Can you outline what it is you’re trying to do. What you want to base where the email is sent on.
I can also give you an example of the way I’ve used it, and actually the reason that I created this in the first place. The client wanted the emails from a form to go to different recipients depending on topic selected.
So first I have a select field with the topics
Topic: [select your-topic "choice 1" "choice 2" "choice 3"]Then I used my other plugin that creates hidden fields to create the following fields.
[simplehidden dynamic-mail-to-filter "dynamic-to-from-topic"] [simplehidden dynamic-mail-to-fields "your-topic"]The first field is the name of the filter to apply and the second is the field name of the topic field so that the value of that field is passed to the filter.
The next thing I did was to create the filter function that returns an email address based on the topic value selected.
add_filter('dynamic-to-from-topic', 'dynamic_to_from_topic'), 10, 2); function dynamic_to_from_topic($recipient, $args=array()) { $topic = 'default'; if (isset($args['your-topic'])) { $topic = $args['your-topic']; } $recipient = 'default@email.com'; $recipients = array( 'default' => 'default@email.com', 'choice 1' => 'person1@email.com', 'choice 2' => 'person2@email.com', 'choice 3' => 'person3@email.com' ); if (isset($recipients[$topic])) { $recipient = $recipients[$topic]; } return $recipient; }Let me know if that helps or if I can explain further.
Forum: Plugins
In reply to: [Private Content] Update ProblemsI just mean, all the version numbers represented in the stats that are for this other plugin that gave me the issues.
Forum: Plugins
In reply to: [Private Content] Update ProblemsBy the way, I just took a look at your stats page. I’m surprised that you haven’t gotten more of these. If this was my plugin I’d be contacting the powers that be to see what I needed to do to fix the situation.
Forum: Plugins
In reply to: [Private Content] Update ProblemsEventually, yes, probably. I’m assuming I’d need to use a plugin like user role manager to create the different user types represented by the ID values o in the other plugin and assign each of the current users to the right roles.
Today my main goal was to get WP core updated. It was several versions behind and updating is all they client is getting right now. Like I said, the current plugin is working and I looked it over and did not see anything that concerned me security wise. The time for doing more needs to be presented to the client. Honestly I’m more worried about updating at all with the information I have. There’s nothing to say that the new version from there will be backward compatible and I’d still be in the same situation.
This is irritating for me because the original developer obviously purchased a plugin but did not bother giving the client access to the account, though I don’t know if updates are included. It’s not all that expensive but I’m not a fan of code canyon and I’d prefer to just find a way to replace it with something I can trust.
Forum: Plugins
In reply to: [Private Content] Update ProblemsThe shortcode for that plugin looks like [pc-pvt-content allow=”53″]
The ID value is an from user types you create using the plugin.
Forum: Plugins
In reply to: [Private Content] Update ProblemsHere’s the link to it http://codecanyon.net/item/privatecontent-multilevel-content-plugin/1467885?ref=LCweb. According to the changelog it was first released Jan of 2012.
Since I do not have access to it I’ve bumped the version number way up in the file so I don’t have problems with it in the future. It appears to be working…. for now. I’m not really happy about the solution. Eventually I’m going to have to replace it but that’s going to mean editing almost every page on the site.
Forum: Plugins
In reply to: [Private Content] Update ProblemsNever mind. It appears that the developer that built this site used a plugin from code canyon that has the same name as this plugin and the WP updater appear to be getting confused