Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Success callback #2

Open
rickydazla opened this issue Mar 4, 2015 · 9 comments
Open

Success callback #2

rickydazla opened this issue Mar 4, 2015 · 9 comments
Assignees

Comments

@rickydazla
Copy link
Member

@jayvin can you give me an example callback for readme that would hide hide all elements within the form fieldset except the legend and then change the legend text, then removing / hiding the popup after a short period? tx

@jayvin
Copy link
Contributor

jayvin commented Mar 4, 2015

@rickydazla : you want that callback only inside the CampaignMonitorCallBack.SuccessCallback function(line 42 in theme.liquid) ?

@rickydazla
Copy link
Member Author

yes

@jayvin
Copy link
Contributor

jayvin commented Mar 4, 2015

Something like below should be added at line 44 in theme.liquid.
$('fieldset', wrapper).children().each(function(){
$(this).is('legend') ? $(this).text('CUSTOM LEGEND TEXT HERE') : $(this).addClass('hidden')
});

//you will have to force the wrapper(modal) to be visible because it will be hidden by default..
setTimeout(wrapper.addClass('modalize'), 500);

//then hide the wrapper again...
setTimeout(wrapper.removeClass('modalize'), 10000);

@jayvin
Copy link
Contributor

jayvin commented Mar 5, 2015

By default on successful registration of an email.

An alert box was being visible previously, after the changes I have done now, you will have either to enable this alert box by setting "ShowAlertBox" to true.

Thing is that, why don't we have a default behavior after a successful callback ? Like the behavior you mentioned above. Of course this can be overwritten by the custom successful callback.

Let me know what you think.

@rickydazla
Copy link
Member Author

With campaign monitor previously we have had two broad options 1) redirect to different landing page (specified within CM), or 2) callback. The default callback for CM ajax form is to display an alert. This is the first time I have asked for some kinda generic but different callback. All other implementations we have worked on have involved more customization..

@rickydazla
Copy link
Member Author

See: RedirectOnSubmitSuccess

@jayvin
Copy link
Contributor

jayvin commented Mar 5, 2015

Yes I know about that one, you told me that one was being used because client wanted to track signups by counting visits on redirected url.
Since now we already tracking these signups in google analytics, the question is, should that still be the default callback??

We can keep these current default behaviors but if there more clients that want to show messages like the one we just did, then we can think about it again.

@rickydazla
Copy link
Member Author

Well, there will always be a box in CM admin with a place to add a re-direct URL so if that is present then that should be the dominatrix. There might be other tracking pixels that people want to add on that page for Google, Facebook, AdRoll or some other shits that we don't know about...

@jayvin
Copy link
Contributor

jayvin commented Mar 5, 2015

I updated the default behaviors, see here
https://github.com/Tricky3/twigsHoney/commit/4834455becd0590f8ad93f657e72a89619fded38
, you can merge and deploy it later.

On Thu, Mar 5, 2015 at 12:17 PM, Rick Davies [email protected]
wrote:

Well, there will always be a box in CM admin with a place to add a
re-direct URL so if that is present then that should be the dominatrix.
There might be other tracking pixels that people want to add on that page
for Google, Facebook, AdRoll or some other shits that we don't know about...


Reply to this email directly or view it on GitHub
#2 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants