Appnitro Software Forums » MachForm

Showing images on view_entry.php

(11 posts)

  1. I have a form set up for a modeling agency which has for image upload fields and what I would like so for those images to show above the download link. How can I do this?

    Posted 1 year ago #
  2. You need to customize some machform files for this. Try to follow these steps :

    1. Edit "view-entry.php" file and go to line 48 for this code :

    $entry_details = get_entry_details($form_id,$entry_id);

    then replace the code with this one

    $options['display_attach_image'] = true;
    $entry_details = get_entry_details($form_id,$entry_id,$options);

    2. Edit "includes/entry-functions.php" file and go to around line 405 ~ 407. You'll see these code :

    if(!empty($options['show_attach_image'])){
    	$entry_details[$i]['value'] = '<img src="'.$options['machform_path'].'images/icons/attach.gif" align="absmiddle" />&nbsp;'.$filename_value;
    }

    then add these code exactly bellow that line

    if(!empty($options['display_attach_image'])){
    	$entry_details[$i]['value'] = '<img src="http'.$ssl_suffix.'://'. $_SERVER['HTTP_HOST'] .dirname($_SERVER['PHP_SELF']) .  '/data/form_' . $form_id . '/files/'.$entry_data['element_'.$element_id]  . '" /> <br />'
    								  . $entry_details[$i]['value'] ;
    }
    Posted 1 year ago #
  3. Forget it. Couldn't see the images because of an issue with htaccess file. Problem solved. :-)

    Posted 1 year ago #
  4. Now how can I exclude images from appearing when I print an entry? Anyone?

    Posted 1 year ago #
  5. Try to edit this file "machform/css/entry_print.css" and then add this code:

    img {
      display: none !important;
    }

    Then delete your browser cache and try to print again.

    Posted 1 year ago #
  6. Hi,

    I tried the steps to show image files uploaded on Entries as stated above, but it is not displaying the attached image. I only have a placeholder with X displayed.

    How can I resolve this?

    Posted 1 year ago #
  7. Try to view the HTML source of your entry page, what is the path to the image?
    Is it pointing to the correct URL?

    Posted 1 year ago #
  8. Hi,

    The HTML Source of the entry page display the path of the image as;

    http://sitedomain/data/form_1/files/element_7_ce065a33cebd5f2d9fc67ff2dd3dc377-5-big_img.jpg"

    big_img.jpg is the image name.

    Regards

    Posted 1 year ago #
  9. Do you have MachForm installed directly under your document root folder?
    If not, I think the path is missing your machform folder.

    It should be something like this:
    http://sitedomain/machform/data/form_1/files/element_7_ce065a33cebd5f2d9fc67ff2dd3dc377-5-big_img.jpg

    Posted 1 year ago #
  10. Yes, you are right and it is like that but it still not showing.

    You can check it out if you want, i can send you all the required information, the site URL and admin details.

    The full path again is;

    src="http://www.thekingscourt.org.uk/mach/data/form_1/files/element_4_ef9c06522a0dbc02b842953270d4c6d0-1-Tunde.jpg" />
    <img src="images/icons/attach.gif" align="absmiddle" /> Tunde.jpg</td>

    The image name on this is Tunde.jpg

    Posted 1 year ago #
  11. Yes, please send me the admin details and URL.
    Also, send me the modified files, I'll check it.

    Please mail to: customer.service [at] appnitro.com

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.