# Form's styling in CHT

**URL:** <https://forum.communityhealthtoolkit.org/t/forms-styling-in-cht/2957>\
**Category:** Development\
**Created:** [August 2, 2023, 6:05pm UTC](https://forum.communityhealthtoolkit.org/t/forms-styling-in-cht/2957 "2023-08-02T18:05:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cliff](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/cliff/32/1638_2.png) [@cliff](https://forum.communityhealthtoolkit.org/u/cliff)\
**Post date:** [August 2, 2023, 6:05pm UTC](https://forum.communityhealthtoolkit.org/t/forms-styling-in-cht/2957/1 "2023-08-02T18:05:10Z")

</div>

hello @jkuester @diana

looking into the task summary form styling below

 ![Screenshot 2023-08-02 at 8.49.18 PM](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/5/5a6dc38ec11fc855194175cd1461bf154c049587.jpeg)

how is the Patient details yellow color stretched from one end to another in the form spec? ie

 ![Screenshot 2023-08-02 at 8.49.58 PM](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/d/dc7a84e335a101fc3e6d564128b06c1698ae02c3.png)

Below is the form spec config i got from the `cht-core` form config and applied the same in my form

 ![Screenshot 2023-08-02 at 8.53.40 PM](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/6/6c4afa9edaa336289b38e1d714c08eda3d13af58.png)

but it doesn’t display the same ie

 ![Screenshot 2023-08-02 at 8.57.08 PM](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/4/4787530432c38a57bb57f23d343126b4c8157146.png)

wondering how this particular styling is done ?

---

<div class="post-metadata">

**Author:** ![jkuester](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/jkuester/32/806_2.png) [@jkuester](https://forum.communityhealthtoolkit.org/u/jkuester)\
**Post date:** [August 2, 2023, 6:20pm UTC](https://forum.communityhealthtoolkit.org/t/forms-styling-in-cht/2957/2 "2023-08-02T18:20:28Z")

</div>

For your summary page (the group that contains the `n_patient_details_titile` field), do you have `summary` included in the `appearance` column? Your `appearance` for the `begin_group` of the summary page needs to be something like: `field-list summary`.

---

<div class="post-metadata">

**Author:** ![cliff](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/cliff/32/1638_2.png) [@cliff](https://forum.communityhealthtoolkit.org/u/cliff)\
**Post date:** [August 2, 2023, 6:30pm UTC](https://forum.communityhealthtoolkit.org/t/forms-styling-in-cht/2957/3 "2023-08-02T18:30:16Z")

</div>

thanks @jkuester  
actually for my case i wanted to insert the yellow line not in the summary (wanted to borrow the styling), wanted to add it the beginning onf the form after a few labels as seen below

 ![Screenshot 2023-08-02 at 9.26.28 PM](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/9/91cc94cb48070779f878cdd4d643e739b142daeb.png)

ideally after `TSIS` note label

---

<div class="post-metadata">

**Author:** ![jkuester](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/jkuester/32/806_2.png) [@jkuester](https://forum.communityhealthtoolkit.org/u/jkuester)\
**Post date:** [August 3, 2023, 3:12pm UTC](https://forum.communityhealthtoolkit.org/t/forms-styling-in-cht/2957/4 "2023-08-03T15:12:30Z")

</div>

Can you try adding `summary` to the `call` group (or whatever group currently has `field-list` set) even though it is not going to be the last page in the form? The `summary` appearance is what [enables the custom CSS](https://github.com/medic/cht-core/blob/acdd8cf1c8f471bd3507ccc78b1682d983f58c81/webapp/src/css/enketo/medic.less#L287) that you are looking for. I don’t know of any reason to say it has to be only be used for the last page int he form or anything like that. It is worth adding it and seeing if the layout of the page meets your expectations!

(If that will not work, we could try including some custom HTML right in the note labels, but that can get messy…)

---

<div class="post-metadata">

**Author:** ![cliff](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/cliff/32/1638_2.png) [@cliff](https://forum.communityhealthtoolkit.org/u/cliff)\
**Post date:** [August 3, 2023, 5:23pm UTC](https://forum.communityhealthtoolkit.org/t/forms-styling-in-cht/2957/5 "2023-08-03T17:23:51Z")

</div>

THANKS @jkuester ,
