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!
March 6, 2005
If 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).
March 6, 2005
Most Users Ever Online: 959
Currently Browsing this Page:
Guest Posters: 3739
Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass
Moderators: Paul (421), cnymike (8), sonika (95)
Administrators: Oliver (6400), Nicky (3)