Inputfield::removeClass() method

Remove the given class (or classes) from this Inputfield


// Remove the "foo" class

// Remove both the "foo" and "bar" classes (since 3.0.16)
$inputfield->removeClass('foo bar');

// Remove the "bar" class from the wrapping .Inputfield element
$inputfield->removeClass('bar', 'wrapClass'); 


// basic usage

// usage with all arguments
$inputfield->removeClass($class, string $property = 'class');


classstring, array

Class name you want to remove or specify one of the following:

  • Single class name to remove.
  • Space-separated class names you want to remove (Since 3.0.16).
  • Array of class names you want to remove (Since 3.0.16).
property (optional)string

Optionally specify the property you want to remove class from:

  • class (string): Default setting. Class for the input element (or whatever the Inputfield default is).
  • wrapClass (string): Class for the ".Inputfield" wrapping element, the most outer level element used for this Inputfield.
  • headerClass (string): Class for the ".InputfieldHeader" label element.
  • contentClass (string): Class for the ".InputfieldContent" wrapping element.
  • Or some other class property defined by a descending Inputfield class.

Return value


Object instance it was called from (method supports fluent interface).

See Also

Inputfield methods and properties

API reference based on ProcessWire core version 3.0.130

Twitter updates

  • New post: ProcessWire 3.0.131 adds support for partial/resumable downloads and http stream delivery, and contains several updates to our comments system, among other updates— More
    3 May 2019
  • New post: Quietly and without interruption this week, the website (and all subdomains) moved from a single static server to a load-balanced multi-server environment, giving us even more horsepower and redundancy than before— More
    19 April 2019
  • New post: With ProcessWire 3.0.130, this week we’ll take a detailed look at a few useful new API additions made in the last few weeks, along with examples of each—More
    12 April 2019

Latest news

  • ProcessWire Weekly #262
    The 262nd issue of ProcessWire Weekly will cover the latest module updates, both Pro modules and non-commercial ones. We've also got some highlights from the support forum, and a beautiful new site of the week. Read on! / 18 May 2019
  • Lots of module updates
    In this post we take a quick look at the new version of ProFields Repeater Matrix, yet another new version of FormBuilder, and a new version of the GoogleClientAPI module.
    Blog / 17 May 2019
  • Subscribe to weekly ProcessWire news

“We were really happy to build our new portfolio website on ProcessWire! We wanted something that gave us plenty of control on the back-end, without any bloat on the front end - just a nice, easy to access API for all our content that left us free to design and build however we liked.” —Castus, web design agency in Sheffield, UK