JavaScript form events data null
-
Hello there,
I use JavaScript form events, but I would like to do an action if the form succeed OR if the user is already subscribed.
I didn’t get where I can have the status of the response in order to differentiate it.I’ve tried different events and this is what I get:
submitted
if already subscribed: data = null
if new: data = null
success
Nothing return if already subscribedsubscribed
Nothing return if already subscribedThis is the code:
mc4wp.forms.on('submitted', function(form, data) { console.log(data); });Precision: it’s not a form used to update. (It’s a simple newsletter subscription form)
I don’t need specially the content of data, I just need a criterion to differentiate “successful/already registered” from “potential errors”.
Thank you for your help !
The topic ‘JavaScript form events data null’ is closed to new replies.