# Bahmni manage forms

**URL:** <https://talk.openmrs.org/t/bahmni-manage-forms/44971>\
**Category:** Implementing\
**Created:** [February 18, 2025, 9:55pm UTC](https://talk.openmrs.org/t/bahmni-manage-forms/44971 "2025-02-18T21:55:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![alain](https://talk.openmrs.org/user_avatar/talk.openmrs.org/alain/32/19772_2.png) [@alain](https://talk.openmrs.org/u/alain)\
**Post date:** [February 18, 2025, 9:55pm UTC](https://talk.openmrs.org/t/bahmni-manage-forms/44971/1 "2025-02-18T21:55:41Z")

</div>

Hello everyone,

Am facing with an issue for managing forms in bahmni, Now we are using form builder in bahmni to create new forms, when you create a form and publish it if you edit that published form bahmni creates a new version of that form meaning it is one form but has many versions, just like it is shown in this image

 ![Screenshot from 2025-02-18 23-42-47](https://talk.openmrs.org/uploads/default/original/3X/4/d/4da16517127c2235e694dd41108e98971c61009b.png)this creates an issue because when they become many there are some other forms you dont see in the form builder dashboard meaning there are hidden because bahmni currently doesnot show all the forms in the form builder interface. so inorder to see other forms you have to retire forms that are not needed while going to openmrs\>manage forms\>select form\>check the retire check box ![Screenshot from 2025-02-18 23-43-33](https://talk.openmrs.org/uploads/default/original/3X/d/5/d518f69cd5759c18feae93de52931e7194bbff7f.png)but on my side it result in this error ![Screenshot from 2025-02-18 23-44-05](https://talk.openmrs.org/uploads/default/original/3X/3/b/3b7d5aca93ce77da1f157630e8947abb46a82648.png)could any help me to understand the root cause of this error ? thanks

---

<div class="post-metadata">

**Author:** ![andy\_ife](https://talk.openmrs.org/letter_avatar/andy_ife/32/5_5575768a8748004e209b776fc1b2916d.png) [@andy\_ife](https://talk.openmrs.org/u/andy_ife)\
**Post date:** [August 24, 2026, 7:41pm UTC](https://talk.openmrs.org/t/bahmni-manage-forms/44971/2 "2026-08-24T19:41:48Z")

</div>

Hello @alain. Were you able to find a solution? I am also having this issue (Bahmni standard 1.0.0 on Docker)

---

<div class="post-metadata">

**Author:** ![tendomart](https://talk.openmrs.org/user_avatar/talk.openmrs.org/tendomart/32/6753_2.png) [@tendomart](https://talk.openmrs.org/u/tendomart)\
**Post date:** [August 25, 2026, 6:18am UTC](https://talk.openmrs.org/t/bahmni-manage-forms/44971/3 "2026-08-25T06:18:00Z")

</div>

cc @akhilmalhotra

---

<div class="post-metadata">

**Author:** ![ravinderkabli\_tw](https://talk.openmrs.org/letter_avatar/ravinderkabli_tw/32/5_5575768a8748004e209b776fc1b2916d.png) [@ravinderkabli\_tw](https://talk.openmrs.org/u/ravinderkabli_tw)\
**Post date:** [August 25, 2026, 7:19am UTC](https://talk.openmrs.org/t/bahmni-manage-forms/44971/4 "2026-08-25T07:19:01Z")

</div>

> [@alain](#):
>
> but on my side it result in this error

Can you share the error logs ?

---

<div class="post-metadata">

**Author:** ![hamsavarthini](https://talk.openmrs.org/letter_avatar/hamsavarthini/32/5_5575768a8748004e209b776fc1b2916d.png) [@hamsavarthini](https://talk.openmrs.org/u/hamsavarthini)\
**Post date:** [August 26, 2026, 6:43am UTC](https://talk.openmrs.org/t/bahmni-manage-forms/44971/5 "2026-08-26T06:43:24Z")

</div>

@alain @andy_ife can any of you please share the logs?

---

<div class="post-metadata">

**Author:** ![andy\_ife](https://talk.openmrs.org/letter_avatar/andy_ife/32/5_5575768a8748004e209b776fc1b2916d.png) [@andy\_ife](https://talk.openmrs.org/u/andy_ife)\
**Post date:** [August 28, 2026, 8:06pm UTC](https://talk.openmrs.org/t/bahmni-manage-forms/44971/6 "2026-08-28T20:06:47Z")

</div>

The logs are very sparse @hamsavarthini. I checked all running containers for logs (except odoo-connect because it spams unending unrelated logs), even watching the logs while retiring a form in OpenMRS, and they don’t show any errors. I’m only able to get a little insight using browser devtools.

Basically, the app sends a POST request to this API:

```auto
https://localhost/openmrs/admin/forms/formEdit.form?formId=19

```

With this request body:

```auto
{
  "name": "Follow up form",
  "description": "",
  "version": 1,
  "_published": "",
  "published": "on",
  "encounterType": 3,
  "_retired": "",
  "retired": "on",
  "retireReason": "old version",
  "action": "Save Form"
}

```

And it gets a 500 response back from the server, with the error page @alain shared.

I’ve tried it while logged in as superman and as admin, with the same error. Do you suggest some other place I could check for logs? Thanks for the help

---

<div class="post-metadata">

**Author:** ![hamsavarthini](https://talk.openmrs.org/letter_avatar/hamsavarthini/32/5_5575768a8748004e209b776fc1b2916d.png) [@hamsavarthini](https://talk.openmrs.org/u/hamsavarthini)\
**Post date:** [August 31, 2026, 5:58am UTC](https://talk.openmrs.org/t/bahmni-manage-forms/44971/7 "2026-08-31T05:58:45Z")

</div>

@andy_ife The container logs may be sparse because the OpenMRS web app logs to its own log file inside the container, not stdout. To find the actual stack trace:

Check the **OpenMRS application log** inside the container

docker exec -it \<openmrs\_container\_name\> cat /var/log/openmrs.log | tail -100

Or find the log file location

docker exec -it \<openmrs\_container\_name\> find / -name “\*.log” -path “\*/openmrs\*” 2\>/dev/null

The 500 error page that alain shared (screenshot) likely contains a Java stack trace — viewing the **page source** in the browser will also reveal it.

In the meantime you can try these workounds:

## **1: Show More Forms in Form Builder**

The Form Builder Control Panel shows **50 forms by default**. This is controlled by the OpenMRS global property `webservices.rest.maxResultsDefault`.

To increase the limit:

1. Go to **OpenMRS \> Administration \> Advanced Settings**

2. Find `webservices.rest.maxResultsDefault`

3. Increase it to an appropriate value (e.g., `200`)

> ⚠ **Warning** : This also affects other areas like the number of patients shown on the registration search page and active patient lists.

This directly addresses the root cause — you won’t need to retire forms just to see hidden ones.

## **2: Retire Forms via REST API (Workaround for 500 Error)**

The 500 error occurs on the **legacy OpenMRS admin page** (`formEdit.form`). Instead of using that UI, retire forms via the **OpenMRS REST API** :

```auto
# Get the form UUID first (search by name)

```

curl -u admin:Admin123 \

“[https://localhost/openmrs/ws/rest/v1/form?q=Follow+up+form&v=custom:(uuid,name,version)](https://localhost/openmrs/ws/rest/v1/form?q=Follow+up+form&v=custom:(uuid,name,version))”

# Retire the form via DELETE (OpenMRS “delete” = retire, not hard delete)

curl -X DELETE -u admin:Admin123 \

“[https://localhost/openmrs/ws/rest/v1/form/](https://localhost/openmrs/ws/rest/v1/form/)\<FORM\_UUID\>?purge=false”

Alternatively, use a POST with the retire payload:

```auto
curl -X POST -u admin:Admin123 \

```

-H “Content-Type: application/json” \

-d ‘{“retired”: true, “retireReason”: “old version”}’ \

“[https://localhost/openmrs/ws/rest/v1/form/](https://localhost/openmrs/ws/rest/v1/form/)\<FORM\_UUID\>”
