Jump to content

Add extra markup to an inputfield


Frank Vèssia
 Share

Recommended Posts

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

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