cforms II User Forum

Registration is currently disabled.
Guest

FAQs

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
Passing variable from form to another WP page
December 2, 2012
4:06 pm
Markie
Guest

Hello :) Great plugin, love it. However I'm very new to programming, hence this post. So prepare yourselves for THE stupid question. I have searched through the forums and tried to check FAQ, but without any luck. Tried what was mentioned here too: http://www.deliciousdays.com/cforms-forum/troubleshooting/possible-to-pass-user-data-into-a-custom-confirmation-page/

So really hope you can help me guys or girls.

I'm having a bit of a struggle with passing variables to another landing page. I WP set up locally in a wampserver, \\\"Use custom input field NAMES & ID's\\\" is checked in the plugin and so is Enable alternative success page (redirect).

Place of form: localhost
Place of redirect:  localhost/strandlove-landingsside/

It seems the landing page can't manage to fetch the data from the form correctly. This is how my-functions looks like:

 

### example: changes redirection address based on user input field

if ( $setting == \\\"redirection\\\" ){

### note: '$$$mypick' references the ID of the HTML element and has been assigned
### to the drop down field in the form configuration, with [id:mypick] !

$var_name = $cformsdata['data'][$cformsdata['data']['$$$your_name']];

if ( $var_name == 'abc' )
return 'http://localhost/strandlove-landingsside/?your_name=$var_name';

}

 

And this in the destination page (which is an own template assigned to the page in WP admin): For the sake of testing, the form consist of only one textfield, which is: Ditt navn[id:your_name]

Welcome .

(placed outside the_loop).

However, the only output is: \\\"Welcome .\\\" Been struggling for a couple of hours with this, and I can't seem to sort it out. Anyone can pinpoint me in the right direction, please?

Appreciating all help I can get. Thank you

December 2, 2012
4:08 pm
Markie
Guest

Just a correction for the bottom part of the first post:

This code is placed outside the loop in the template file (redirect destination):  Welcome <?php echo $_POST["your_name"]; ?>.<br>

December 2, 2012
4:14 pm
Markie
Guest

Please replace the ??? with your data!

  • URL to the FORM: (not yet created)
  • The browser used: chrome
  • cforms version: Version 14.6
  • Your Wordpress version3.4.2
December 2, 2012
7:41 pm
Markie
Guest

I fixed it. Delete thread, please.

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
23 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: 3762

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5359

Posts: 18741

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

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

Administrators: Oliver (6400), Nicky (3)