arjen Posted October 29, 2014 Share Posted October 29, 2014 Is there a fieldtype available with only a label and description? I would like to show some basic explanation to a site editor. This is an example of how it might look. Link to comment Share on other sites More sharing options...
Martijn Geerts Posted October 29, 2014 Share Posted October 29, 2014 Maybe you can add inputfield markup with the api to your temple. I never test this however 1 Link to comment Share on other sites More sharing options...
arjen Posted October 29, 2014 Author Share Posted October 29, 2014 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. Link to comment Share on other sites More sharing options...
adrian Posted October 29, 2014 Share Posted October 29, 2014 This is what you are looking for - some of teppo's handiwork https://processwire.com/talk/topic/6556-module-textarea-markup-inputfield/ 3 Link to comment Share on other sites More sharing options...
arjen Posted October 29, 2014 Author Share Posted October 29, 2014 Exactly! Thanks adrian, I knew I saw if before, but couldn't find it. Link to comment Share on other sites More sharing options...
Martijn Geerts Posted October 29, 2014 Share Posted October 29, 2014 Markup fieldtype isn't available however by default in the backend. Can't get it to work with the API, so maybe not possible at all. Link to comment Share on other sites More sharing options...
arjen Posted October 29, 2014 Author Share Posted October 29, 2014 Thanks for your effort Martijn. 1 Link to comment Share on other sites More sharing options...
Soma Posted October 29, 2014 Share Posted October 29, 2014 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); } } 2 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