# Howto Change the template of my forms (solved)

**URL:** <https://discourse.cakephp.org/t/howto-change-the-template-of-my-forms-solved/9207>\
**Category:** Uncategorized\
**Created:** [April 5, 2021, 8:17am UTC](https://discourse.cakephp.org/t/howto-change-the-template-of-my-forms-solved/9207 "2021-04-05T08:17:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dirk](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/dirk/32/2174_2.png) [@dirk](https://discourse.cakephp.org/u/dirk)\
**Post date:** [April 5, 2021, 8:17am UTC](https://discourse.cakephp.org/t/howto-change-the-template-of-my-forms-solved/9207/1 "2021-04-05T08:17:15Z")

</div>

I´m struggling with changing the templates of my some input forms.  
I found this:

> **[Form - 4.x](https://book.cakephp.org/4/en/views/helpers/form.html#customizing-the-templates-formhelper-uses)**
>
> The FormHelper focuses on creating forms quickly, in a way that will streamline validation, re-population and layout.

This links to  
[https://api.cakephp.org/3.9/class-Cake.View.Helper.FormHelper.html#%24\_defaultConfig](https://api.cakephp.org/3.9/class-Cake.View.Helper.FormHelper.html#%24_defaultConfig)

But what I´m looking for is the default templates for all forms, so that I can use them as pattern to see what values I can change.

Can someone tell me where to find the default templates?

Edit:  
Sorry for my bad English, I will give an example of what I want to change:

a simple multiple checkbox in my form looks like this:

> ```
> <div class="grid grid-cols-5 gap-4 mb-2">
> <div class="checkbox">
> <label class="selected">
> <input id ="foodadditives-ids-11" type="checkbox>
> LABELNAME
> </label> 
> </div>                     
> <div class="checkbox"> .....</div>
> <div class="checkbox"> .....</div>
> </div>
> 
> ```

I want to change the css styles of class=“checkbox”, class=“selected” and the the class of the input field.

I hope now it is clearer what I try to do

---

<div class="post-metadata">

**Author:** ![cecile](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/cecile/32/2149_2.png) [@cecile](https://discourse.cakephp.org/u/cecile)\
**Post date:** [April 8, 2021, 5:25pm UTC](https://discourse.cakephp.org/t/howto-change-the-template-of-my-forms-solved/9207/2 "2021-04-08T17:25:39Z")

</div>

I’m not sure to really understand : do you want to change the css applied to those class or do you want to change class=“selected” to class=“somethingelse” ?

---

<div class="post-metadata">

**Author:** ![dirk](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/dirk/32/2174_2.png) [@dirk](https://discourse.cakephp.org/u/dirk)\
**Post date:** [April 8, 2021, 5:46pm UTC](https://discourse.cakephp.org/t/howto-change-the-template-of-my-forms-solved/9207/3 "2021-04-08T17:46:12Z")

</div>

> [@cecile](#):
>
> do you want to change the css applied to those class

thanks for your answer. i want to change the css applied to those classes

---

<div class="post-metadata">

**Author:** ![cecile](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/cecile/32/2149_2.png) [@cecile](https://discourse.cakephp.org/u/cecile)\
**Post date:** [April 8, 2021, 6:09pm UTC](https://discourse.cakephp.org/t/howto-change-the-template-of-my-forms-solved/9207/4 "2021-04-08T18:09:11Z")

</div>

The css folder is in /webroot.

If you are using the style provided, there are 3 possible files : normalize, millligram and cake. Most of the form style is in milligram.  
I suggest you add your rules to change it in cake.css.

If you are using your own css file, even easier 🙂

---

<div class="post-metadata">

**Author:** ![dirk](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/dirk/32/2174_2.png) [@dirk](https://discourse.cakephp.org/u/dirk)\
**Post date:** [April 9, 2021, 9:44am UTC](https://discourse.cakephp.org/t/howto-change-the-template-of-my-forms-solved/9207/5 "2021-04-09T09:44:30Z")

</div>

Solved, the solution can be found here:

> [@Cake 4: Comprehension question: Form Templates (solved)](https://discourse.cakephp.org/t/cake-4-comprehension-question-form-templates/9219/3):
>
> i searched, but did not find it, or maybe did not recognize, that i found it. tomorrow i start a new search, thanks for your answer
