Hello, I'm hoping you guys can help - I'm pretty new to joomla and RS Form Pro, and I really need some help.
I have a form on my company website which used to function fine, then we changed the offering slightly and it meant I had to adapt the form.
I've since been told by customers that the form isn't submitting - when you press submit on the page, it was just refreshing the page but retaining the details.
I've been trying to resolve the problem, but I've had to have a go at amending the script to reflect the changes that I needed to make. Since I've done this, on pressing submit, the form refreshes and looses the information, but doesn't send the form.
The form is here:
www.thegreenhomecompany.com/book-a-survey-now
The code I amended (sorry I didn't back it up now!) is here:
[b]Original form[/b]
[color=#440088]{error}
<p><b>3. Please fill in the rest of your details below - don't forget to reselect your house in the image above if you are seeing this message:</b></p>
<table border="0">
<tr>
<td>{fullname:caption}*</td>
<td>{fullname:body}<div class="formClr"></div>{fullname:validation}</td>
<td>{fullname:description}</td>
</tr>
<tr>
<td>{address:caption}*</td>
<td>{address:body}<div class="formClr"></div>{address:validation}</td>
<td>{address:description}</td>
</tr>
<tr>
<td>{daytime_telephone:caption}*</td>
<td>{daytime_telephone:body}<div class="formClr"></div>{daytime_telephone:validation}</td>
<td>{daytime_telephone:description}</td>
</tr>
<tr>
<td>{evening_telephone:caption}*</td>
<td>{evening_telephone:body}<div class="formClr"></div>{evening_telephone:validation}</td>
<td>{evening_telephone:description}</td>
</tr>
<tr>
<td>{email:caption}*</td>
<td>{email:body}<div class="formClr"></div>{email:validation}</td>
<td>{email:description}</td>
</tr>
<tr>
<td>{TGHC_division:caption}*</td>
<td>{TGHC_division:body}<div class="formClr"></div>{email:validation}</td>
<td>{TGHC_division:description}</td>
</tr>
<tr>
<td>{required:caption}</td>
<td>{required:body}<div class="formClr"></div>{required:validation}</td>
<td>{required:description}</td>
</tr>
<tr>
<td>{Source code:caption}*</td>
<td>{Source code:body}<div class="formClr"></div>{Source code:validation}</td>
<td>{Source code:description}</td>
</tr>
<tr>
<td>{Source code2:caption}</td>
<td>{Source code2:body}<div class="formClr"></div>{Source code2:validation}</td>
<td>{Source code2:description}</td>
</tr>
<tr><br></tr>
<tr>
<td></td>
<td>{captcha:body}<div class="formClr"></div>{captcha:validation}<br /><p><strong>security</strong> please enter the letters you see above.</p></td>
</td>
</tr>
<tr>
<td>{Submit:caption}</td>
<td>{Submit:body}<div class="formClr">
</div>{Submit:validation}</td>
<td>{Submit:description}</td>
</tr>
</table>
<div style="visibility:hidden; position:absolute">
{latitude:body}
{longitude:body}
{postcode:body}
</div>
<script type="text/javascript">
function setType() {
if(document.getElementsByName('form[type]')[0].checked) {
document.getElementById('recipient').value="hello@thegreenhomecompany.com";
document.getElementById('message').value="<p>Great! We’ll be calling you to make an appointment as soon as possible.</p>";
}
if(document.getElementsByName('form[type]')[1].checked) {
document.getElementById('recipient').value="freesolar@thegreenhomecompany.com";
document.getElementById('message').value="<p>OK, we’ll assess your property to see if it is eligible for a free system and get back to you as soon as possible.</p>";
}
}
</script>[/color]
I've amended the code as best as I can see here - but I just can't see what I've done wrong - I'm not a developer and only really have a basic understanding of what I'm doing.
[color=#880088]{error}
<br><p><b>Please fill in the rest of your details below:</b></p><br><br>
<table border="0">
<tr>
<td>{fullname:caption} *</td>
<td>{fullname:body}<div class="formClr"></div>{fullname:validation}</td>
<td>{fullname:description}</td>
</tr>
<tr>
<td>{address:caption} *</td>
<td>{address:body}<div class="formClr"></div>{address:validation}</td>
<td>{address:description}</td>
</tr>
<tr>
<td>{daytime_telephone:caption} *</td>
<td>{daytime_telephone:body}<div class="formClr"></div>{daytime_telephone:validation}</td>
<td>{daytime_telephone:description}</td>
</tr>
<tr>
<td>{evening_telephone:caption} *</td>
<td>{evening_telephone:body}<div class="formClr"></div>{evening_telephone:validation}</td>
<td>{evening_telephone:description}</td>
</tr>
<tr>
<td>{email:caption} *</td>
<td>{email:body}<div class="formClr"></div>{email:validation}</td>
<td>{email:description}</td>
</tr>
<tr>
<td>{TGHC_division:caption} *</td>
<td>{TGHC_division:body}<div class="formClr"></div>{TGHC_division:validation}</td>
<td>{TGHC_division:description}</td>
</tr>
<tr>
<td>{Source code:caption} *</td>
<td>{Source code:body}<div class="formClr"></div>{Source code:validation}</td>
<td>{Source code:description}</td>
</tr>
<tr>
<td>{Source code2:caption}</td>
<td>{Source code2:body}<div class="formClr"></div>{Source code2:validation}</td>
<td>{Source code2:description}</td>
</tr>
<tr>
<td>{captcha:caption}</td>
<td>{captcha:body}<div class="formClr"></div>{captcha:validation}</br><p><strong>security</strong> please enter the letters you see above.</p>
</td>
<td>{captcha:description}</td>
</tr>
<tr>
<td>{required:caption}</td>
<td>{required:body}<div class="formClr"></div>{required:validation}</td>
<td>{required:description}</td>
</tr>
<tr>
<td>{Submit:caption}</td>
<td>{Submit:body}<div class="formClr"></div>{Submit:validation}</td>
<td>{Submit:description}</td>
</tr>
</table>
<div style="visibility:hidden; position:absolute">
onClick="document.getElementById('latitude').value = document.getElementById('p_map_latitude').value; document.getElementById('longitude').value = document.getElementById('p_map_longitude').value; document.getElementById('postcode').value = document.getElementById('address').value;"
</div>
<script type="text/javascript">
function setType() {
if(document.getElementsByName('form[TGHC_division]')[0].checked) {
document.getElementById('recipient').value="hello@thegreenhomecompany.com";
document.getElementById('message').value="<p>Great! We’ll be calling you to make an appointment as soon as possible.</p>";
}
if(document.getElementsByName('form[TGHC_division]')[1].checked) {
document.getElementById('recipient').value="hello@thegreenhomecompany.com";
document.getElementById('message').value="<p>Great! We’ll be calling you to make an appointment as soon as possible.</p>";
}
if(document.getElementsByName('form[TGHC_division]')[2].checked) {
document.getElementById('recipient').value="hello@thegreenhomecompany.com";
document.getElementById('message').value="<p>Great! We’ll be calling you to make an appointment as soon as possible.</p>";
}
[/color]
The idea is that the user completes the form, but on completion, the script takes the longitude and latitude from the google map, as well as the initial postcode entry and emails that to the address specified, in addition to the information from the user completed fields.
As all emails now need to go to the same address, do I even need the script at the bottom?
Please can anyone see if there are any points that I need to amend to make the form work?
Thanks in advance for any help.