gpnf-display-image-file-upload.php

Code

Filename: gpnf-display-image-file-upload.php

<?php
// Update "123" to your child form ID and "4" to the child File Upload field ID.
add_filter( 'gpnf_display_value_123_4', function( $value, $field, $form, $entry ) {
	$value['label'] = sprintf( '<img src="%s">', $value['value'] );
	return $value;
}, 10, 4 );

Comments

    1. Sebastian Pedersen
      Sebastian Pedersen Staff November 22, 2024 at 11:53 pm

      Hi Tony, The snippet currently only supports single file upload fields. If you’re already using a single file upload field without “Enable Multi-File Upload” selected, and it’s still not working, could you please open a ticket via our support form, so we can dig into this some more?

      Best,

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.