Custom Form on Dashboard - script not evaluated while editing through Forms Display Control - Bug?

Bahmni version 0.91.

  1. Create a new form using Forms 2.0
  2. Add ControlEvent for a control to update date based on calculation and also allow future date for this calculated date control.
  3. Save and publish.
  4. Check if it works well through Observations. i.e. EDD is disabled and auto calculated on entering LMP.
  5. In Dashboard.json mention the form name under Forms Display Control so that it appears for editing on Dashboard.
  6. Select the form to edit and notice that A. It does not allow future dates though it was set in Step 2. B. The script attached with the ControlEvent in step 2 is not applied here ie control EDD is not disabled and not auto-calculated.

This is mostly because rather than attaching a form here the Forms Display Control merely attaches it as concept set. The future dates can be allowed by setting allowfuturedates = true for that control but still the script is not applied.

If Forms Display Control is not meant to handle custom forms can we plan for it to do so or any other way?

I am debugging this further.

Has anyone seen this before?

Hi,

Forms 2.0 forms are not yet supported in existing forms display control - as they are not concepts ( unlike forms 1). In current forms display control (type: forms), it searches for forms configured in form group as concepts. As, ANC, History is a concept(set) - It is showing the same in display control.

We have developed new display control type - formsV2 to support forms2.0 forms, PRs for which have been raised, once merged support for the same should be available in v0.93

Thanks,

Santosh

The current “display control” only applies to Forms 1 (conceptSetUI). There is work going on from one of the projects. As much as I know, the work is done and ready to be integrated. Have you checked this thread

Thank you for sharing that thread. It helps. Can you share the PR link?

Its slotted for 0.93 and currently merged on master. link here

We also noticed that Custom forms are not getting displayed in Forms Display Control.

If the name of the obsgroup level concept is same as the form name then it displays the obsgroup as observation and not as form otherwise it does not display the form.

This may be because this line in formsTable.js is using visitService to get the observations instead of observationservice?

Investigating it further.

I tried to concise the text field named “Early morning time” through the JSON but it didn’t work. Could anyone in the community please help me with this?