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 Related Topics
Displaying an uploaded image in a template using duplicated forms
I use duplicated forms on different Pages that use the same page template.. Everything displays fine except the uploaded image.
October 3, 2012
4:54 am
feemcgill
Guest

Hello! Thanks for this great plugin.. My issue is that I use duplicated forms on different Pages that use the same page template.. Everything displays fine except the uploaded image.  My code is below:

$array = get_cforms_entries(get('form_name'),false,false,'id',false,'asc'); /* get('form_name') is used to grab the cformII name from the specific page -- it works!  */

My issue is I would like to dynamically have the form ID added to the request for the uploaded image. For example (looking at the line of code below), how can I have the '4' in [*4] be automatically replaced the with the current form's ID? 

'<img class="aligncenter" src="http://MYDOMAIN.com/wp-content/uploads/cform/' . $e['id'] . '-' . $e['data']['Photo[*4]'] . '" alt="" />'

I'm sure this is simple I just cannot figure it out. Any help would be greatly appreciated. Thanks! 

October 12, 2012
2:59 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

with the latest version you can change the file name on the fly (my-functions.php) and add the form ID to it…or do whatever you like with the file name.

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
24 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: 3761

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5358

Posts: 18739

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

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

Administrators: Oliver (6400), Nicky (3)