Please replace the ??? with your data!
- URL to the FORM: http://???
- The browser used: firefox3
- cforms version: 10.6
- Your Wordpress version: 2.8.4
[desc]:
_
Fist off let me just say that i am not a coded, I mostly employ the 'stabing in the dark' approachto coding and am amazed by how much I can achive with such a weak understanding of PHP. Anyway, the point is that I appologize in advance for missing fundimental concepts of what I am trying to do. Be kind. ;-)
I'm using get_cforms_entries API to output the data from a form with a file upload field.
Working from the example Table Output in the help section, I setup up one of the colums to
output what I hoped would be a link to that file uploaded by the form: $e['data']['Photo'] but
returned nothing, then I found this.
And so I tried again with this $e['data']['Photo[*1]'] and it still returned nothing. Then I spent
4 hours trying to find other examples and experimenting. I was just about to give up and then,
on a whim, I changed it to $e['data']['Photo[*2]'] and bam, it output the filename… I must be
the lucky coder hack in all the land.
I then added some html /w a path to my upload directory to make the images show up:
<?php $array = get_cforms_entries(); /* all data, no filters */
echo '<table>';
echo '<tr><th>Proformers</th><th>Venue</th><th>Date of Show</th><th>Poster</th></tr>';
foreach( $array as $e ){
echo '<tr><td>' . $e['data']['Name of Proformers'] . '</td><td>' . $e['data']['Venue'] . '</td>
<td>' . $e['data']['Date of Show'] . '</td><td><img width=200 class="aligncenter"
src="http://YOUR UPLOAD FOLDER' . $e['data']['Photo[*2]'] . '" alt="" /></td><tr>';
}
echo '</table>'; ?>
That almost worked but it couldn't find the files because the plugin was adding the NoID to
the beginning of the file name, so I found this. And disabled the NOID function.
So… my question is… is there a way to call the NOID and the filename so I don't have to
disable the NOID functionality in order to get this get_cforms_entries to display the images?
Thank you,
Christian