Jump to content

Fieldtype that just displays HTML, nothing else


Recommended Posts

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?


Link to comment
Share on other sites

Or without any dependencies:

$wire->addHookAfter("ProcessPageEdit::buildFormContent", function($event) {
  $form = $event->return;
  $page = $event->object->getPage();
  if($page->template != 'my-template') return;
    'type' => 'markup',
    'label' => 'foo',
    'value' => 'bar@'.date('Y-m-d H:i:s'),


  • Like 5
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...