Hello I love chronoforms and have been using for a while, but I can't seem to get this doing what I really want it to. I am using a simple form that captures the email of a user and stores in a table. This is for newsletter purposes later. What I would ideally like to have happen is the user inputs their email, it live validates(hopefully) and when the user hits enter or clicks on the submit button (image right now) it would say thank you in a modal, stores the email data and then either have the user close the modal or it can close itself, not too worried about the closing right now.
I have example at http://www.raveandradha.com and the newsletter form is at the top right of the site. Currently if you add your email : test(at)test.com and hit enter, it does the normal chronoforms submit with redirect ( cause its a live site) but when you click the image to submit, it submits the form, opens the thank you on a modal window but then it takes the user to a blank page... again I am currently redirecting the page so that the user sees the thank you and it looks like a user expects, but with the redirecturl empty it still redirects to the blank task=send page.
Form code - HTML :
Form code - Javascript :
Any direction or assistance would be appreciated thanks. I'm not a Javascript coder, but a pretty quick study.
Thanks and cheers.
I have example at http://www.raveandradha.com and the newsletter form is at the top right of the site. Currently if you add your email : test(at)test.com and hit enter, it does the normal chronoforms submit with redirect ( cause its a live site) but when you click the image to submit, it submits the form, opens the thank you on a modal window but then it takes the user to a blank page... again I am currently redirecting the page so that the user sees the thank you and it looks like a user expects, but with the redirecturl empty it still redirects to the blank task=send page.
Form code - HTML :
<?php
if ( !$mainframe->isSite() ) { return; }
JHTML::_('behavior.modal')
?>
<div class="form_item" style="padding-top:15px;">
<div class="labelinput">
<label class="cf_label" style="width: 150px;">JOIN NEWSLETTER</label>
<input style="color:#888;" class="cf_inputbox" maxlength="150" size="30" title="" id="text_0" name="email" type="text" value="enter email address" onfocus="this.value==this.defaultValue?this.value='':null" />
<a class="modal" onclick="javascript:submitform(); void(0);" href="/index.php?option=com_content&view=article&id=16&tmpl=component" rel="{handler: 'iframe', size: {x: 400, y: 400}}"><img src="images/stories/submit.png" /></a>
Form code - Javascript :
function submitform()
{
document.ChronoContact_newsletter.submit();
}
Any direction or assistance would be appreciated thanks. I'm not a Javascript coder, but a pretty quick study.
Thanks and cheers.