Readonly permission in hooks/tablename.php doesn‘t work
Posted: 2020-06-26 19:20
Dear all,
I‘ve a user group „Finance“ where the user „max“ member of it.
In /hooks/tablename.php I‘ve edited the function tablensne_dv per JavaScript for 2 different kind of field types for readonly permissions related to the group Finance:
1. For text fields:
...
\$j('#Textfield').prop(‚readonly‘, true).....
....
2. For drop-down field:
...
\$j('#Dropdownfield').attr(‚disabled‘, true).....
....
Both points above work fine, means, if user „max“ logged in, the fields above are grey for him (not editable). So far ok!
BUT: If „max“ enter values in other fields where he has read/write permissions and click on save button all the values in both types of readonly fields are LOST! (= empty!)
How to fix this? Anyone an idea?
Kind regards
I‘ve a user group „Finance“ where the user „max“ member of it.
In /hooks/tablename.php I‘ve edited the function tablensne_dv per JavaScript for 2 different kind of field types for readonly permissions related to the group Finance:
1. For text fields:
...
\$j('#Textfield').prop(‚readonly‘, true).....
....
2. For drop-down field:
...
\$j('#Dropdownfield').attr(‚disabled‘, true).....
....
Both points above work fine, means, if user „max“ logged in, the fields above are grey for him (not editable). So far ok!
BUT: If „max“ enter values in other fields where he has read/write permissions and click on save button all the values in both types of readonly fields are LOST! (= empty!)
How to fix this? Anyone an idea?
Kind regards