• Resolved Michael D

    (@michael-divine)


    Is there a way to validate the form and show a success message with the sign up page? For instance, if a pop up window has the signup form, when the user clicks ‘Subscribe’ the form shows a message like ‘Success! You’ve signed up!’ rather than forwarding to the page that the plugin creates.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Michael D

    (@michael-divine)

    Ok After doing some googling I have seen that this has been requested since 2013, ten years ago.

    I suppose that isn’t going to come any time soon. Which is too bad.

    I did find this page but it doesn’t seem to work.
    https://www.thenewsletterplugin.com/forums/topic/ajax-subscription

    Thread Starter Michael D

    (@michael-divine)

    For anyone like me who wants an AJAX form submission here was my solution…

    Since refreshing a page on submission of a form shouldn’t be happening in 2023 – and anyone submitting a form would lose their place on the site – I needed to find a work around.

    I didn’t want to have to hard code an AJAX form (that’s beyond my level of expertise) but I realized that since I use Contact Forms 7 for my general forms and that Newsletter integrates with CF7 allowing you to collect email addresses from form submissions, I simply made a Newsletter sign up form using CF7. I can style it like my other forms. The basics of the CF7 form look like this:

    Your email 
    [email* your-email autocomplete:email]
    [response]
    [submit "Sign Up!"]

    Put that in the Edit Contact Form window. Then change the response messages.

    The [email] part is from Newsletter’s integration.
    [response] puts the ‘Thanks for signing up!’ above the submit button.

    Obviously, you can put in first, last name, etc.

    It will validate real email addresses and allow for an opt in checkbox as well. I have it sending messages to wordpress@[mysite.com] which isn’t a real address, that way I don’t get emails with every sign up.

    Then, using the CF7 integration with Newsletter, connect the fields with your form.

    Hope that helps someone.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Ajax subscription confirmation’ is closed to new replies.