Jump to content

Recommended Posts

Posted

Is there a fieldtype available with only a label and description? I would like to show some basic explanation to a site editor.

post-365-0-83181400-1414589160_thumb.png

This is an example of how it might look.

Posted

Thanks Martijn, good idea. We use that sometimes when creating forms with the API on the front-end. The Markup fieldtype isn't available however by default in the backend.

Posted

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

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...