You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first attempt runs without any problems, but if the email is for example already in the list the user needs to send a second form (with a new email address). The response then is always false, maybe this is an issue with a new generated token?
Thanks in advance for you help
Jens
The text was updated successfully, but these errors were encountered:
The response then is always false, maybe this is an issue with a new generated token?
It most probably is. The token is reset whenever the form was submitted successfully. In your example an email that already exists is a success:
// Email already in the listif ($response['status'] == 400) {
$result['success'] = true;
You can get the new token after the first form submission was processed and return it with the success/error message so the next form submission can use the new token. Your JSON response of the route might look like this:
My setup is similar to https://forum.getkirby.com/t/how-to-create-a-newsletter-subscription-form-using-uniform-mailchimp/3677/12
The first attempt runs without any problems, but if the email is for example already in the list the user needs to send a second form (with a new email address). The response then is always false, maybe this is an issue with a new generated token?
Thanks in advance for you help
Jens
The text was updated successfully, but these errors were encountered: