Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Contact Form 7 + Wysija WordPress



I'm rookie in PHP and in writing code and I need to add the user, email and birthdate on Wysija (Mailpoet) from my Contact Form 7 form.

Wysija has this instructions:

And there´s this post in blog:

But Contact Form 7 has changed the code:

I also want to show the my public newsletter lists in my Contact Form 7 form to the subscribers select the wanted lists.

Contact Form Name - 'Newsletter'

Fields in the form:

[text* your-name]
[email* your-email]
[date* your-birthdate]

Can you help me?

Thanks! :)

Answers (1)


Francisco Javier Carazo Gil answers:

Why don't you use a form directly from MailPoet - Wysija?

miguelamendes9 comments:

Because the date field i can't put the date field a required field.

Francisco Javier Carazo Gil comments:

Ok, but with some JS code you can do it.

miguelamendes9 comments:

Can you show me how?

The date field in Mailpoet has a pre-select date, is not a blank field.

Francisco Javier Carazo Gil comments:

Show me a URL, the field and I tell you.

miguelamendes9 comments:

Francisco Javier Carazo Gil comments:

Insert this JS in this page:

var current_year = new Date().getFullYear();


if($("#form-wysija-shortcode548c96005bb1a-2 > p.wysija-paragraph.wysija-date > select.wysija_date_day").val() == "1" &&
$("#form-wysija-shortcode548c96005bb1a-2 > p.wysija-paragraph.wysija-date > select.wysija_date_month").val() == "January" &&
$("#form-wysija-shortcode548c96005bb1a-2 > p.wysija-paragraph.wysija-date > select.wysija_date_year").val() == current_year
alert("You should choose your birthdate");
return false;




miguelamendes9 comments:

I insert the JS in this page -

miguelamendes9 comments:

I inserted the JS code in the page but didn't work out. I could subscribe without changing the date.

Francisco Javier Carazo Gil comments:

Send me FTP credentials via PM and I insert it in a moment (you should know how to insert JS in WordPress theme for example).

miguelamendes9 comments:

I have already inserted the JS code but didn't work out.

Francisco Javier Carazo Gil comments:

How have you inserted it? I would need to see if there is some syntax o lex error there (if I cannot test, I am not sure).

miguelamendes9 comments:

I have the Divi Theme ( and it has a Page Builder and i put i the "Text" part. There were i put code and shortcodes in the Page Builder. See the JPG.