• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Newbie: Form won't submit, help please!!!

Newbie: Form won't submit, help please!!! 12 years 8 months ago #18351

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.
Last Edit: 12 years 8 months ago by wilco.alsemgeest. Reason: Next time use the code option
The administrator has disabled public write access.

Re: Newbie: Form won't submit, help please!!! 12 years 8 months ago #18434

Hello,

You are making it very difficult for your self.
When you have a dropdown box for example with different divisions you can use the following syntax
your@email.com|Division A
your@email.com|Division B
your@email.com|Division C

In the admin e-mail configuration you can use this field to choose the e-mail address to use to send the e-mail.

Create a thank you message with all needed information

Never put Javascript or PHP codes on the end of the form in the lay-out configuration.
Use the special configuration options for this.
Regards
Wilco Alsemgeest

Please note: my help is not official customer support. To receive your support, submit a ticket by clicking www.rsjoomla.com/my-support-tickets.html
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!