Submit not working

farb 29 Apr, 2011
Whe I click submit it doenst go to the thank you screen.

Here is the url
<!-- w --><a class="postlink" href="http://www.fosterhomefinders.org">www.fosterhomefinders.org</a><!-- w -->

Any Suggestions?
GreyHead 30 Apr, 2011
Hi farb,

Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.

Bob
farb 01 May, 2011
Here you go. Thanks
GreyHead 01 May, 2011
Hi farb,

The form submits OK on my test site. It shows some broken results because you have your Thank You message in both of the OnSubmti boxes and both contain unclosed <div> tags which break the layout.

Remove the code from the OnSubmit Before Email box and add </div> to the end of the code in the OnSubmit After Email box and it looks OK (you may also need to turn DeBug off).

Bob
farb 01 May, 2011
I made the changes but on submit is still just refreshing the page. It is sending me an email with the information, but it is not going to the thank you page.
farb 01 May, 2011
It is also not validating now.
GreyHead 01 May, 2011
Hi farb,

I think that the validation isn't working because none of your inputs have type attributes :-( Please add type='text' to them.

Bob
farb 01 May, 2011
Thanks. I'll try adding attributes. Any idead why I can't get to the thank you page after submitting. It appears that the url is changing, but it is just bring the form back up. Thanks again for the help.
GreyHead 01 May, 2011
Hi farb,

No I can't see why the redirection is taking place - may be something happening with the SEF URLs?

Bob
farb 01 May, 2011
I dont have sef url's enabled. Could it have something to do with the fact that the website is completly empty besides for this form? There are no other pages at all. I can email you login info if it will help. This form goes live tomorrow and I really want to have it fixed.
Thanks
GreyHead 01 May, 2011
Hi farb,

By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.

Bob
farb 01 May, 2011
I PM'ed you the info. Thanks
GreyHead 02 May, 2011
Hi farb,

I think that the page reshowing has to do somehow with there being no other pages on the site. Not a problem that I've seen before. I fixed it by adding a little code to the Form HTML to check the value of Submit and show the Thank you page if the form has just been submitted:
<img style="float:right" width="365px" alt="Image Goes Here" src="images/tip_signup.jpg" />
<?php
$submit = JRequest::getString('Submit', '', 'post');
if ( $submit ) {
?>
<div style="text-align: center; font-weight: bold;">Thank you for entering your information.<br>You will be signed up to receive E-mail tips.</div>
<?php
  return;
}
?>
<table . . .

The broken validation was because your HTML had no type attributes in the inputs as I posted earlier.

Bob
farb 02 May, 2011
Bob,

Thank you so much. Everything is working. Your help convinced me to validate my install.
This topic is locked and no more replies can be posted.