Created
April 12, 2024 00:06
-
-
Save joedolson/9e14117850d9e4b6aa7e039a609bfe48 to your computer and use it in GitHub Desktop.
Console JS for viewing uploaded images in Gravity Forms admin list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let images = document.querySelectorAll( '.field_id-18 a' ); images.forEach( function( el ) { let url = el.getAttribute( 'href' ); let img = el.querySelector( 'img' ); img.setAttribute( 'src', url ); } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change the selector as necessary.