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
Readonly permission in hooks/tablename.php doesn‘t work
Re: Readonly permission in hooks/tablename.php doesn‘t work
Correction:
The behavior with loosing data after clicking on save button happens ONLY in case of dropdown fields (tried also with date fields (days, month, year ID) like
\$j('#Datefield-dd').attr(‚disable‘, true)....
\$j('#Datefield-mm').attr(‚disable‘, true)....
\$j('#Datefield).attr(‚disable‘, true)....
—> loosing the data after saving!!!
Means wirh .prop(‚readonly‘, true)... works fine ONLY for Textfields!!
How to fix this getting work with dropdown and date fields?
The behavior with loosing data after clicking on save button happens ONLY in case of dropdown fields (tried also with date fields (days, month, year ID) like
\$j('#Datefield-dd').attr(‚disable‘, true)....
\$j('#Datefield-mm').attr(‚disable‘, true)....
\$j('#Datefield).attr(‚disable‘, true)....
—> loosing the data after saving!!!
Means wirh .prop(‚readonly‘, true)... works fine ONLY for Textfields!!
How to fix this getting work with dropdown and date fields?