Zahari M. Posted August 18, 2013 Share Posted August 18, 2013 Hi Ryan Been working on styling the comments form and have come across the need to add classes to the submit button. This is to add two Zurb button classes... small and radius. To do this I had to go into the core to modify CommentForm.php As others in the future may wish to style their submit buttons, it would be great if you could add the option for button classes when we run this... echo $page->comments->render(array Thanks Ryan! Link to comment Share on other sites More sharing options...
Martijn Geerts Posted August 18, 2013 Share Posted August 18, 2013 Why not doing it with jQuery ? // ps don't know the actual markup, so selector will be different I think. $(".comment input[type=submit]").addClass("small radius"); Or you could move the comment module to ./site/modules/ and make the changes there. Nothing wrong with that aproach. Link to comment Share on other sites More sharing options...
Soma Posted August 18, 2013 Share Posted August 18, 2013 http://processwire.com/talk/topic/696-quick-guide-to-the-comments-system/page-3 1 Link to comment Share on other sites More sharing options...
Zahari M. Posted August 18, 2013 Author Share Posted August 18, 2013 Thanks Martijn and Soma for your replies! 3 great approaches from you both. That's awesome. I never thought of moving out a core module to our sites folder and modifying it. But I feel most comfortable with that approach and I'm happy going with that. Thanks for that link Soma. It contains a very instructional concept of great value. Nontheless.... I still think it would be of great value for the comment form API to be able to accept a class for the submit button without using any of our workarounds! We can currently configure just about everything else that is needed via the API, so why not the submit class as well? I'm very certain more people in the future who want to style the button would be looking for it expecting to find it in the API Anyway... it was just a wish Cheers guys! 1 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