cforms II User Forum

Registration is currently disabled.


Login form protected by Login LockDown.

Lost password?
Advanced Search

— Forum Scope —


— Match —


— Forum Options —


Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Submit successful, but taken to wrong page
July 14, 2007
3:10 am


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!




July 14, 2007
8:46 am
Munich, Germany
Forum Posts: 6400
Member Since:
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). 

July 14, 2007
9:03 am
Munich, Germany
Forum Posts: 6400
Member Since:
March 6, 2005

General Note: 

Just a quick heads-up for anyone else using cforms for their sidebar, 5.2 has been patched on July 13 – you may want to re-download (or apply the above patch yourself).

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
25 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: 3763

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5359

Posts: 18742

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)