Hey guys, I have a client that wants to have track the number of submissions using "adTracking" which to me why? why not use google analytics, but anyway!
My problem is I can track the clicks of the ".contourButton" class, but I can't track the number of page submissions.
just like on your basic RenderForm.ascx from umbracoContour, Im wanting to control when the placeholder with the thank you message
Mean I've tried different alternatives, but my knowledge of jQuery is quite limited. mean for the time being if i can get the alert box to display when the form is submitted then I will be happy as larry and I can do what I need to do with the rest.
If someone change help me I would be most highly grateful!
The problem would be in subscribing to the `submit` event of the input (button), you should hook this event up to the `form` as per the jQuery documentation; I'm not sure how Contour works with what version of Umbraco you're using, but with 4.7.1.1 it doesn't generate it's own form - so this might not work for you. But if it does, and you're using a validation framework with a generic way of checking for valid submissions then you could essentially just have one 'global' validation routine for submit on the (or a named) `form` tag.
Other than that, if hooking into the form won't do it for you, you could possibly try validating within the `click` event and simply use `e.preventDefault()` if invalid (you would need to add the `e` parameter argument to the even function.)
JQuery After Submit, Show Alert Box
Hey guys, I have a client that wants to have track the number of submissions using "adTracking" which to me why? why not use google analytics, but anyway!
My problem is I can track the clicks of the ".contourButton" class, but I can't track the number of page submissions.
just like on your basic RenderForm.ascx from umbracoContour, Im wanting to control when the placeholder with the thank you message
RenderForm.ascx (snipplet)
<asp:PlaceHolder ID="ph_messageOnSubmit" runat="server" Visible="false">
<div class="showThankYou">
<h2 class="contourMessageOnSubmit">
<asp:Literal ID="lt_message" runat="server" Visible="false" /><umbraco:Item field="#Thank You" runat="server" />
</h2>
<p><umbraco:Item field="#Our Representive" runat="server" /></p>
</div>
</asp:PlaceHolder>
JQuery snipplet
Mean I've tried different alternatives, but my knowledge of jQuery is quite limited. mean for the time being if i can get the alert box to display when the form is submitted then I will be happy as larry and I can do what I need to do with the rest.
If someone change help me I would be most highly grateful!
Regards
Paul
The problem would be in subscribing to the `submit` event of the input (button), you should hook this event up to the `form` as per the jQuery documentation; I'm not sure how Contour works with what version of Umbraco you're using, but with 4.7.1.1 it doesn't generate it's own form - so this might not work for you. But if it does, and you're using a validation framework with a generic way of checking for valid submissions then you could essentially just have one 'global' validation routine for submit on the (or a named) `form` tag.
Other than that, if hooking into the form won't do it for you, you could possibly try validating within the `click` event and simply use `e.preventDefault()` if invalid (you would need to add the `e` parameter argument to the even function.)
is working on a reply...