• Resolved bhasic

    (@bhasic)


    I’m saving multiple image url’s at once from a CF7 form checkbox with Cfdb. They get saved to The same column and I add img src tag to each url with php.

    In table they are saved like this:

    
    <img src="https://www.../flamme.gif">, <img src="https://www.../Aquatic-pollut-red.gif">
    

    I want to display the url’s as images in Cfdb-html <td>${images}</td> but they show up as text. In page source they are like this:
    &lt ;img src=”https://www…/skull.gif”&gt ;

    How can I make them display as images?`

    • This topic was modified 2 years, 9 months ago by bhasic.
    • This topic was modified 2 years, 9 months ago by bhasic.
    • This topic was modified 2 years, 9 months ago by bhasic.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter bhasic

    (@bhasic)

    I have tried making a shortcode like this:

    
    require_once(ABSPATH . 'wp-content/plugins/contact-form-7-to-database-extension/CFDBPermittedFunctions.php');
    require_once(ABSPATH . 'wp-content/plugins/contact-form-7-to-database-extension/CFDBFormIterator.php');
     
    function cfdb_decode($text) {
      return html_entity_decode($text, ENT_NOQUOTES);
    }
    cfdb_register_function('cfdb_decode');
    

    and

    
    require_once(ABSPATH . 'wp-content/plugins/contact-form-7-to-database-extension/CFDBPermittedFunctions.php');
    require_once(ABSPATH . 'wp-content/plugins/contact-form-7-to-database-extension/CFDBFormIterator.php');
     
    function cfdb_decode($text) {
      return htmlspecialchars_decode($text, ENT_NOQUOTES);
    }
    cfdb_register_function('cfdb_decode');
    

    with

    
    [cfdb-html form="Myform" hide="Submitted,Submitted Login,Submitted From,submit_time" trans="images=cfdb_decode(images)" debug="true"]
    

    but then the image-cells become empty.
    Debug shows this:

    'images=cfdb_decode(images)'
    Array
    (
        [0] => Array
            (
                [0] => images
                [1] => =
                [2] => cfdb_decode(images)
            )
    
    )
    Thread Starter bhasic

    (@bhasic)

    Got it working by building the table inside shortcode and using htmlspecialchars_decode in the row with image url’s.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to display multiple images in one column in Cfdb-html?’ is closed to new replies.