Close

Event on Contact Us (success)?

hkreklame
8 years ago
#12962 Quote
Avatar
  • 34
Is there any way to know when the contact form is sent? I need to track the event, but only IF the form is successfully sent.
hristian.dimov
8 years ago
#12966 Quote
Avatar
  • Moderator
  • 386
hkreklame wrote:
Is there any way to know when the contact form is sent? I need to track the event, but only IF the form is successfully sent.


Hi,

Yes, there is an event when the form is successfully sent. However, this event is used also when a new review is submitted. The event is called "quickTabsRefreshedTab". Would that work for you?
Regards,
Hristian Dimov
Nop-Templates.com
hkreklame
7 years ago
#13069 Quote
Avatar
  • 34
hristian.dimov wrote:
Is there any way to know when the contact form is sent? I need to track the event, but only IF the form is successfully sent.

Hi,

Yes, there is an event when the form is successfully sent. However, this event is used also when a new review is submitted. The event is called "quickTabsRefreshedTab". Would that work for you?


Hello.

This works. How would i write the function?
hristian.dimov
7 years ago
#13074 Quote
Avatar
  • Moderator
  • 386
hkreklame wrote:
Is there any way to know when the contact form is sent? I need to track the event, but only IF the form is successfully sent.

Hi,

Yes, there is an event when the form is successfully sent. However, this event is used also when a new review is submitted. The event is called "quickTabsRefreshedTab". Would that work for you?

Hello.

This works. How would i write the function?


Hi,

you can do something like this:

$(document).on('quickTabsRefreshedTab', function(){ /* Enter your code here */ });

Hope this helps!
Regards,
Hristian Dimov
Nop-Templates.com
hkreklame
7 years ago
#13077 Quote
Avatar
  • 34
Thanks!
hkreklame
7 years ago
#13078 Quote
Avatar
  • 34
hristian.dimov wrote:
Is there any way to know when the contact form is sent? I need to track the event, but only IF the form is successfully sent.

Hi,

Yes, there is an event when the form is successfully sent. However, this event is used also when a new review is submitted. The event is called "quickTabsRefreshedTab". Would that work for you?

Hello.

This works. How would i write the function?

Hi,

you can do something like this:

$(document).on('quickTabsRefreshedTab', function(){ /* Enter your code here */ });

Hope this helps!


Are you sure this method will run after the contact form is posted?

I did a alert(), but i didnt run.
hristian.dimov
7 years ago
#13079 Quote
Avatar
  • Moderator
  • 386
hkreklame wrote:
Is there any way to know when the contact form is sent? I need to track the event, but only IF the form is successfully sent.

Hi,

Yes, there is an event when the form is successfully sent. However, this event is used also when a new review is submitted. The event is called "quickTabsRefreshedTab". Would that work for you?

Hello.

This works. How would i write the function?

Hi,

you can do something like this:

$(document).on('quickTabsRefreshedTab', function(){ /* Enter your code here */ });

Hope this helps!

Are you sure this method will run after the contact form is posted?

I did a alert(), but i didnt run.


Hi,

yes, I'm sure. I tested it before posted it here.

Where do you place the code?
Regards,
Hristian Dimov
Nop-Templates.com
hristian.dimov
7 years ago
#13084 Quote
Avatar
  • Moderator
  • 386
hristian.dimov wrote:
Is there any way to know when the contact form is sent? I need to track the event, but only IF the form is successfully sent.

Hi,

Yes, there is an event when the form is successfully sent. However, this event is used also when a new review is submitted. The event is called "quickTabsRefreshedTab". Would that work for you?

Hello.

This works. How would i write the function?

Hi,

you can do something like this:

$(document).on('quickTabsRefreshedTab', function(){ /* Enter your code here */ });

Hope this helps!

Are you sure this method will run after the contact form is posted?

I did a alert(), but i didnt run.

Hi,

yes, I'm sure. I tested it before posted it here.

Where do you place the code?


Hi,

Forgot to mention that this is available only in the 3.70 and 3.80 version of the plugin. It was added on July 18, 2016, so if your NopQuickTabs product version is below 21042, you need to update the plugin ( and of course if you are using 3.70 or 3.80 ).
Regards,
Hristian Dimov
Nop-Templates.com
hkreklame
7 years ago
#13085 Quote
Avatar
  • 34
Hello. I'm using version 3.8.456.22141 on quicktabs.
hkreklame
7 years ago
#13086 Quote
Avatar
  • 34
I had to insert it into

$(document).ready(function () {

    $(document).on('quickTabsRefreshedTab', function () {
        alert();
    });

}

Thanks for your help!