• I added Form manager plugins. Users will fil in form with many fields and upload jpg files.
    Visitors to site need to have posibility to see all forms result with main jpg image, later on they can click and see whole form result.
    I tried to use [form form-1] but I have not so much posibility to change display results. I want to have possibility to display jpg image (small image) , not only link to that image.
    How I can achieve it in fomrs manager plugin?

    Regards
    Raff

Viewing 1 replies (of 1 total)
  • I was also trying this. I copied and pasted some codes from here and there. The result is like display all the images uploaded by the user. I am no PHP guy. The following is the code I used in my-summery-default.php

    The following code is working by the way. It just needs a ‘get the first image, resize it (make it small) and display’ magic. Any help is greatly appreciated.

    <?php
    // Set the post content to a variable
    $szPostContent = fm_summary_the_value('Photo1');
    
    // Define the pattern to search
    $szSearchPattern = '~http:[^"]*~' ; //~<img [^\>]*\ />~
    
    // Run preg_match_all to grab all the images and save the results in $aPics
    preg_match_all( $szSearchPattern, $szPostContent, $aPics );
    
    // Count the results
    $iNumberOfPics = count($aPics[0]);
    
    // Check to see if we have at least 1 image
    if ( $iNumberOfPics > 0 )
    {
       // Now here you would do whatever you need to do with the images
         // For this example I'm just going to echo them
         for ( $i=0; $i < $iNumberOfPics ; $i++ )
         {
     		  ?>
                <img src="<?php echo $aPics[0][$i] ; ?>" class="profile"/>
          <?php
         };
    };
    // ...finish the loop, etc
    ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Forms display result on the page’ is closed to new replies.