DrQuincy Posted December 21, 2021 Share Posted December 21, 2021 I searched the forum for this and couldn't find anything. Is there a module/fieldtype that doesn't store anything for the actual page in the database. It just allows you to insert any HTML you want at a given point in the template/form. Is there such a thing? Thanks. Link to comment Share on other sites More sharing options...
MarkE Posted December 21, 2021 Share Posted December 21, 2021 https://processwire.com/modules/inputfield-runtime-only/ ? 1 Link to comment Share on other sites More sharing options...
DrQuincy Posted December 21, 2021 Author Share Posted December 21, 2021 Ah, thanks @MarkE, l will try that. ? Link to comment Share on other sites More sharing options...
bernhard Posted December 21, 2021 Share Posted December 21, 2021 Or without any dependencies: <?php $wire->addHookAfter("ProcessPageEdit::buildFormContent", function($event) { $form = $event->return; $page = $event->object->getPage(); if($page->template != 'my-template') return; $form->add([ 'type' => 'markup', 'label' => 'foo', 'value' => 'bar@'.date('Y-m-d H:i:s'), ]); }); 5 Link to comment Share on other sites More sharing options...
DrQuincy Posted December 22, 2021 Author Share Posted December 22, 2021 Nice! ? 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