Conflict of integration between CF7 and comment form
-
Hello,
I have different forms for different interest groups. I am using the integration for both the CF7 and the comment module, with the code you provided in your guide.
In the contact form I added:
<input name="mc4wp-INTERESTS[number]" value="group" type="hidden" />
It works, the user is register in the correct group.I have a problem in the contact form when I registering custom fields for comment form, with this hook to function.php
add_action ('comment_form', function() { ?> <input name="INTERESTS[number]" value="group" type="hidden"> <? Php }); add_filter ('mc4wp_integration_data', function ($ vars) { $vars ['INTERESTS'] = isset($ _POST['INTERESTS'])? $_POST['INTERESTS']: array (); return $vars; });
With this code, the user is registered in the group from comment form, but no longer works the CF7 integration: from the contact form the user is subscribed to the list, but not to the group.
How can I use both of these codes together without conflict?
Thanks
- The topic ‘Conflict of integration between CF7 and comment form’ is closed to new replies.