Hi guys,
I love the plugin and have used it to create a quick briefing form on my company's intranet site so that my producers can brief in quick jobs to the production team.
The only thing I can't figure out is how to get form data into a post. I know you will shout at me about searching the forums and I have already spent 2 days searching and reading but nowhere could I figure out how to do this. I have little PHP skill so have created a new Page template in WP called Brief. I have put the following code into the brief.php as per this forum thread.
<?php
echo '<table>';
echo '<tr><th>Name</th><th>Institution</th><th>Website</th><th>What they say:</th></tr>';
$all = get_cforms_entries();
foreach( $all as $e ){
echo '<tr><td>'.$e['data']['Your Email'].'</td><td>'.$e['data']['Job Name'].'</td><td>'.$e['data']['Job Number'].'</td><td>'.$e['data']['client'].'</td><tr>';
}
echo '</table>';
?>
I have changed the data fields to field names for my form (Job Name, Job Number, Client) but when I launch the page I get the following error:
Warning: Invalid argument supplied for foreach() in /Library/WebServer/Documents/intranet2/wp-content/themes/freshy2/brief.php on line 5
Can somone please give this noob a hand?!
Cheers