Recommended Posts


I am trying to style the comments form (and comments list) to match the rest of the site. I know that it's possible to edit the CSS file for the comments module, but I would rather add my existing classes to the fields, instead of making another css file containing the same CSS styling.

I use the following to render the form: $page->comments->renderForm();

Is there an easy way to add the CSS classed to the fields?



Edited by formmailer

Share this post

Link to post
Share on other sites

Take a look at this post ( You can copy the comment files from wire/modules into the module folder of your site folder (site/modules) and there you can change your CSS classes and the markup too.

I think this is the best approach to adapt the comments output to your needs. You dont need to hack anything and it will not be overwritten during updates.


  • Like 1

Share this post

Link to post
Share on other sites


Yes, I thought about doing that, but I was hoping there was a shortcut to this. A risk (even if it's a minimal one) is that future core updates could break the module.

I was hoping there would be a way to change classes without modifying the module. But if this isn't possible I'll go with the copied & modified module.


Share this post

Link to post
Share on other sites

Another approach would be to add the CSS classes with Jquery onload, but you are also not aware of changes in the future. I use the first method for years now and I had no problems. I dont think that there will be major changes taken in the future.  

At the moment you could only change some attributes of the form tag, but not for the inputs.:(

  • Like 1

Share this post

Link to post
Share on other sites

I managed to build the whole site without using Jquery, for speed optimization, so unfortunately the Jquery option is no alternative.

I will go for the copy solution. Thank you for your help!

  • Like 1

Share this post

Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By rafaoski
      This profile can be used as a simple business card or blog.
      The profile does not use any framework css structure, only styles based on CSS GRID and FLEX.
      To minimize page loading, I added lazy load for images ( Tupola Lazy Load ).
      With include functions like:
      Live Example

    • By Antonio Iorio
      Hi guys, as I would need your support. I state to be a beginner and I met the application the day before yesterday for the first time.
      I'm creating a manga reading site using wiremanga and I need to know how I can incorporate altervista advertising. (this is my site if you could serve
      I have also modified some elements of both the .css and php files but despite saving they are not updated.
    • By rafaoski
      Hello All ... I just added a new Site Profile ...
      It is important that you use the latest version that supports the new Fields => Fieldset in Tab , Fieldset ( Page ) for this time it is version 3.0.83 DEV
      A simple profile for quick start new Page ... There are several pages like About Us, Blog, Portfolio, Contact Page ...
      The profile is not based on any framework, I just used some css, flexbox, grid, font awesome, and added a simple FlexBox Grid called GRIDLEX ...
      Some Screenshots:



      BLOG PAGE:



      In addition, I added 2 great modules:
      Tracy Debugger:

      Markup Sitemap:

    • By rafaoski
      I would like every new Site Profile like new REGULAR Profile to have modern support for quick creation like browser sync, minify css, js . Something on the style below:
      One profile that does not have any CSS frontend attached but has the features needed to quickly add eg pagination, comment form, or site menu something like:
      I'm not very godd with js but webpack.js meybe is good for this solution ... I would like to know what advanced users in the front end think about this combination and what would be the best ...
    • By Peter Knight
      Playing around with the UIKit theme this morning and tweaking it.
      It's called UIKit Classic and it's a nod to the Classic theme. 
      For me the Classic theme always sticks in my mind as being most definitively Processwire-ey because
      It was my fist intro to PW I thought the colours were quite unique and like the mix of blue, pink and green. They're very distinctive and I'd hate for PW to look like just another WP install. In a crowded CMS marketplace I think it's good to differentiate visually. The two screengrabs are just the same screen. A before and an after. 
      I put this together using the Chrome the web inspect tool so there's no fancy mixins or LESS etc. Actually there's not even any CSS now that I've refreshed the page.
      I do think there needs to be a detailed comprehensive through tutorial for people wishing to make their own themes. Probably 85% here don't need it and understand the directory structure and how it's all compiled but equally I think there's another 15% here with the design skills but not the tech chops to get this done. If we want designers to design themes then we need the process with screengrabs, list of software (I have CodeKit, Dreamweaver, Sublime etc).
      Anywho - just my 2€ worth

      The before shot below...