Cant save "Hide this field if" rules in Demogaphics LBF

I am trying to add a field with a “Hide this field if” rule to the Demographics LBF but whenever I click “Save Changes”, the rule is removed

Example:

Add Rule:

Click “Close” (stays green):

Click “Save Changes” (removes rule):

When I check the logs, these lines catch my eye, not sure if related:

[Fri Nov 15 15:36:18.605058 2024] [php:warn] [pid 1705] [client 107.77.208.143:16995] PHP Warning:  Undefined array key "action" in /var/www/localhost/htdocs/openemr/interface/super/edit_layout.php on line 425, referer: https://emr.ontrackpediatrictherapy.com/interface/super/edit_layout.php
[Fri Nov 15 15:36:18.605103 2024] [php:warn] [pid 1705] [client 107.77.208.143:16995] PHP Warning:  Undefined array key "validation" in /var/www/localhost/htdocs/openemr/interface/super/edit_layout.php on line 470, referer: https://emr.ontrackpediatrictherapy.com/interface/super/edit_layout.php

Whats strange is that validation rules seem to work fine:

Any and all assistance is greatly appreciated!

OpenEMR Version
7.0.2 Patch 1

Browser:
FireFox

Operating System
I’m using: Ubuntu

1 Like

I also would like to know if there is a way to change Demogaphics LBF without cousing issues. I tried to change one of the fields and the create new patient function stopped working. I could not arrange the order of the fields when I hit save nothing would change.

Hi @Goddard have you solve this issue? I also encounter this same issue when i try to have a conditional on the demographics field. the same error logs with you.

This is already solve Thanks :slight_smile:

Circling back, I did end up resolving this issue, I believe the solution was simply to change my php.ini to update max_input_vars to 5000 (from 3000)

My php.ini file was at /etc/php82/php.ini (although this may be different for others)

My understanding is the issue came from the fact that I had made to many additions to my demographics forms such that when I tried making any update, it would simply not save the changes. I only initially believed the issue was with the validation rules because those were the most visible

Thanks!

Hi @Goddard yes your correct that is also how i fixed this error by increasing the max_input_vars in php.ini.

1 Like

I opened a github issue so we can keep track of this and hopefully get it fixed at some point.

1 Like

Thanks you @adunsulag

Huge thank you @adunsulag !