How to display image inside a form

by perbatek   Last Updated August 23, 2017 17:07 PM

I want to show image insida a form I've try it with tag inside form but it's doesnt render anything heres my code

$form['y']['image_div'] = array(
            '#prefix' => '<div class="image"><img src="https://4.bp.blogspot.com/-tGbw82Gz8hA/WPR6WiOGPaI/AAAAAAAAEjk/JDPdpK3p-8wAUe2QTQbtWSdTZR_DBc-QACLcB/s640/Checkout.png" />',
            '#suffix' => '</div>',
        );

How do I render an image inside form.inc in drupal ?

Tags : 7 6


Related Questions