Hi,
After I submit my form it displays a Thank You image that I set. But I have to scroll my page to the top in order to see my Thank you image.
Within On submit event I only have dbsave, email and display message. All are working perfect except i have to manually scroll to the top to see my thank you image. I use the image instead of text.
I tried to follow the solutions on this forum but not successful. Could anyone please help?
Thanks
RK
Hi RK,
Try this code in a "Load JavaScript" action in the "on submit" event:
jQuery(document).ready(function($){
$(".chronoform").focus();
});
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
thanks Max for your reply.
I added the code in the Load Javascript and added either before or after the Display message but still not working.
Do i have to change anything in the code?
Sorry, I forgot that the form doesn't exist after you send it, so you will need to add an element with a special class to the thanks message:
<div class="chronoform">
Thank you!
</div>
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max,
it is still not working for me. I copy exactly but when i test submit the form I got the thank you message but I still have to scroll up to the top of the screen to see the message.
I look at the existing solution in the forum about creating the anchor but I couldn't get it work. could you please advise what code i should be using?
thanks
RK
You need to have my code above inside a "display message" action, and you need to have the code I posted earlier inside a "load js" action, both actions should be inside the "on submit" area.
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max,
Please find my 2 attached screen shots. I did put your code. For the display message I use the thank you image file not the text that's all. I got my image display but I still have to scroll from the bottom of my page to see it.
Thanks
RK
Hi RK,
Apologies for forgetting to answer here earlier.
Please use the code below instead:
jQuery(document).ready(function($){
$('html, body').animate({ scrollTop: $('.chronoform').offset().top }, 'slow');
});
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max,
Thanks for your reply, unfortunately it still didn't work for me with the new code.
I copy/paste exact code didn't work. I replace my form name $('.Enquire') on $('.chronoform') also didn't work.
Thanks
RK
Hi RK,
The ".chronoform" is to reference the class of the "div" inside which you have the thank you message.
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.