Frank Vèssia Posted March 29, 2020 Share Posted March 29, 2020 I'd like to add extra markup to a specific inputfield text in the admin using a module, I tried an hook like this but pw says the method doesn't exist $this->addHookBefore('Inputfield::render', $this, "addMarkup"); protected function addMarkup($event){ $Inputfield = $event->object; if($Inputfield->attr('name') == "myfieldname"){ $Inputfield->setMarkup([ 'item_content' => "my markup" ]); } } Link to comment Share on other sites More sharing options...
bernhard Posted March 29, 2020 Share Posted March 29, 2020 If you hook the render() method, the $event->return contains the markup. Therefore you need to modify $event->return to modify the markup: 3 Link to comment Share on other sites More sharing options...
Frank Vèssia Posted March 29, 2020 Author Share Posted March 29, 2020 nice, thanks bernhard! Link to comment Share on other sites More sharing options...
gmclelland Posted March 29, 2020 Share Posted March 29, 2020 @bernhard off topic, but what is RockBodyBuilder? 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