Topic RSS
3:34 pm
Hi,
I have a page that creates a form based on post data. The fields variables are inside an if…else condition.
I get my form to send emails, the confirmation message on top of the form also shows but the redirect doesn't work.
Any idea on what the problem might be?
I'm using the latest cforms and tested on Firefox 2 and IE7.
Thanks for any help and congrats on a fantastic plugin.
10:22 pm
March 6, 2005
OfflineYou're are saying, that you're using the dynamic form feature?
Can you try to get the redirect working with a simple, standard form?
12:42 am
Ok, so maybe I was a little shot on the details.
Let's see if I can do better.
The form is deployed on a blog page where I'm running php (not on index.php but on an actual content page) and is dynamically generated to use variables that are coming from post data on a previous page as the value for some of the $fields.
I've managed to remove the generating function from the if..else cycle, so this is not where the problem is.
Everything works well on the generated form (emails, db tracking) except the redirect.
Answering your second question, If I use the base form outside of the php code (as in <!–cforms#–>), the redirect works fine.
To run the php on a page I'm using the runPHP plugin. Do you think there might be something conflicting in the evaluation?
Thanks for your fast reply.
7:40 am
March 6, 2005
OfflineThanks for the add'l info.
There is not reason for the redirect feature to not work then with your dynamic form (provided the form settings are properly configured). The code used to execute the redirect is the same for standard & dynamic forms, so if one works the other should do, too: you may want to try again the standard form test with no Ajax support on the same form (you may have done that already).
Also, since your dynamic form gets already displayed fine and the email part works, too, the redirect in fact must work, here is the code part (which gets executed right after sending the emails & before 'displaying' the success message):
if ( get_option('cforms'.$no.'_redirect') ) {
?>
<script type="text/javascript">
location.href = '<?php echo get_option('cforms'.$no.'_redirect_page') ?>';
</script>
<?php
}
Edit: on second thought, it may in fact have to do with the evaluation of code (Javascript output) by runPHP …but I've never used that plugin so I can't say for sure.
Most Users Ever Online: 959
Currently Online:
81 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
tracedef: 43
mores: 21
Gyrus: 20
frozenwaste: 18
asuffredini: 15
photoworks: 14
Member Stats:
Guest Posters: 3548
Members: 1464
Moderators: 3
Admins: 1
Forum Stats:
Groups: 1
Forums: 4
Topics: 5157
Posts: 18385
Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass
Moderators: Paul (421), cnymike (8), sonika (95)
Administrators: Oliver (6398)
FAQs
Home
Add Reply
Add Topic
Quote










