Form A contains information on inventory.
Form B is to select specific items.
On form B the user is selecting an item then the lookup fields are watching the item field. One of the lookup fields is an image. I want the image to be displayed and not the ID. See attached.
Solutions?
I don't believe you will be able to show the actual image through the form field. You could show the URL of the image, and perhaps your users could click the link to view the image. That code is here:
add_filter( 'frm_filtered_lookup_options', 'change_lookup_options', 10, 2 ); function change_lookup_options( $options, $args ) { if ( $args['field']->id === '25' ) { // change 25 to the id of the field in the other form foreach ( $options as $k => $option ) { $options[ $k ] = wp_get_attachment_url( $option ); } } return $options; }
Using Walters example to get the image URL you could set an change event via JS to throw that image URL into an HTML field and/or with some custom HTML.
Please login or Register to submit your answer
Since form fields have been recently expanded to support a wide range of shortcodes, maybe a view with a filter for the current record and the standard show image would work?