etanb
October 5, 2018, 3:20am
1
Version ghost:1.22.4
I’m using the awesome new subscribe feature but there’s one thing we’d really like to avoid: redirecting the user to the /subscribe page upon subscribe. We want them to stay on the same page they subscribed on. Is there any way to do this?
Tony
October 5, 2018, 5:35am
2
@etanb maybe you can just perform the POST to /subscribe through AJAX.
etanb
October 5, 2018, 5:28pm
3
Have you seen this work before? Don’t I need to know what input fields I need to be sending in my POST request?
Tony
October 6, 2018, 2:20am
4
@etanb yes I’ve it on my blogs.
The way it works in your theme is just adding a customizable line in your template:
{{subscribe_form
form_class="gh-signin"
input_class="gh-input"
button_class="gh-btn gh-btn-blue gh-btn-block"
placeholder="Your email address"
autofocus="true"
}}
So I bet you can add some JS code to event.preventDefault();
and perform your own “AJAX” call parsing all the elements inside the form.
system
Closed
October 20, 2018, 2:20am
5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.