DrQuincy Posted December 21, 2021 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.
MarkE Posted December 21, 2021 Posted December 21, 2021 https://processwire.com/modules/inputfield-runtime-only/ ? 1
DrQuincy Posted December 21, 2021 Author Posted December 21, 2021 Ah, thanks @MarkE, l will try that. ?
bernhard Posted December 21, 2021 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
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