Topic RSS
3:10 am
Hi,
I was having problems and then disabled Ajax, and now cforms (just downloaded it today) is working fine, except that no matter what page I'm on (I'm using it for a simple contact form that appears in my sidebar and thus on every page), after submission, the browser redirects to the page of my first post.
I'd like it just to redirect back to the page the sender was originally on when he or she sent the message. How can I fix this? I'm not using any other plugins. Thanks!
Yours,
Josh
8:46 am
March 6, 2005
OfflineIf you leave Ajax turned on, it should work fine, as the page doesn't get reloaded (currently it seems to be disabled for this form).
The reason it jumps back to the default page after submitting (in non ajax mode) has to do with the fact that the form target is derived from the current permalink (line 1654, cforms.php):
$action = get_permalink() . '#usermessage'. $no . $actiontarget;
A possible fix (again for non ajax enabled browsers) could be to replace get_permalink() with $_SERVER['REQUEST_URI']:
$action = $_SERVER['REQUEST_URI'] . '#usermessage'. $no . $actiontarget;
Give this a try (it should work and I'll in fact include this patch going forward, it seems better than the permalink approach).
Most Users Ever Online: 959
Currently Online:
62 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: 3552
Members: 1464
Moderators: 3
Admins: 1
Forum Stats:
Groups: 1
Forums: 4
Topics: 5159
Posts: 18392
Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass
Moderators: Paul (421), cnymike (8), sonika (95)
Administrators: Oliver (6398)
FAQs
Home
Add Reply
Add Topic
Quote











