lenoir Posted April 21, 2021 Share Posted April 21, 2021 Hi, I wonder if there's a way to display an image in the backend, to help fill out some fields. In this particular case, I want do display a map of buildings with all entries numbered, so the client can look up the number in the image and select the right entry from a dropdown menu. Thank you! Link to comment Share on other sites More sharing options...
bernhard Posted April 21, 2021 Share Posted April 21, 2021 Or a simple hook to modify the page edit form ? <?php $wire->addHookAfter("ProcessPageEdit::buildFormContent", function($event) { $page = $event->process->getPage(); if($page->template != 'yourtemplate') return; $form = $event->return; $f = $this->wire(new InputfieldMarkup()); $f->label = 'Help'; $f->icon = 'picture-o'; $f->value = "<img src='https://via.placeholder.com/350x150'>"; $form->insertAfter($f, $form->get('title')); }); 3 Link to comment Share on other sites More sharing options...
lenoir Posted April 22, 2021 Author Share Posted April 22, 2021 Thank you Bernhard! That's exactly what I needed. I need to get my head around hooks, hooks are cool. ? Link to comment Share on other sites More sharing options...
bernhard Posted April 22, 2021 Share Posted April 22, 2021 See the link "afraid of hooks" in my sig ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now