Jump to content

Fieldtype with only label and description


arjen
 Share

Recommended Posts

This works with an autoload module hooking into ProcessPageEdit::buildForm()

protected function hookPageEditForm(HookEvent $event){
    $page = $event->object->getPage();
    if($page->template == "basic-page"){
        $form = $event->return;
        $contentTab = $form->find("id=ProcessPageEditContent")->first();
        $field = $this->modules->InputfieldMarkup;
        $field->label = "Some Label";
        $field->value = "Some Text";
        $contentTab->prepend($field);
    }
}
  • Like 2
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
 Share

  • Recently Browsing   0 members

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