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
Working with cForms data
December 25, 2007
3:18 pm
Il_Burbero
Guest

Please replace the ??? with your data!

  • Your URL: http://
  • The browser used: Firefox
  • cforms version: 6.5
  • Your Wordpress version: 2.3.1

[desc]:Have u any description about cForm's  keys, id's and data's?


Could you explain me more about array_keys($form), I mean if I need get user data from each field of form 
what I need to do?Could you be so kind to post any example? How I can get data field by field without comparison? 

Example I have generated source: 
<li><label for="cf_field_3"><span>Name<br></span></label><input name="cf_field_3" id="cf_field_3" class="single fldrequired" value="Enter Your Name" onfocus="clearField(this)" onblur="setField(this)" type="text"><span class="reqtxt">&nbsp;(mustbe!)</span></li> 

Source in function.php must be: 

if ( $formID == '3' ) { // your third form (1st form would be '' !)

foreach ( array_?($form) as $? ) { // I need ONLY fieldset & field names

if ( $?=="Field Number" ) //I need by № as in admin panel №,

$form[$?] =$myvariable; // I need to store it:)
}
    // send to 3d party or do something else
}

So I search in code and here without results:(

 

 

December 25, 2007
7:14 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

Please revert to the example on the cforms Help page (Post-processing of submitted data):

array_keys($form)

Will extract all the input fields transmitted. If you want to get an overview of what exactly these keys are, simply turn on cforms tracking, submit a test form and take a look at the recorded entry (via the tracking tab).

All items listed (their left names) are stored as-is in the $form variable, the keys = the name on the left, values = the data on the right. Even the order (top-down) is the same!

The $form array is an associative array (key value pairs).

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
39 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: 3739

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5339

Posts: 18706

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

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

Administrators: Oliver (6400), Nicky (3)