kirchaj
Posts: 215
|
Posted: 08/10/2016, 10:21 AM |
|
I am in a situation where I have a system with security levels and need to hide several form elements (textboxes) during the update process from one group. That group is not allowed to see the financial fields but needs to update the status, notes etc.
I can hide the text boxes but when the form updates it empties the fields which were hidden. Because they are financial fields, it then causes taxes and totals to be incorrect.
Is there a way in a form to change a text box to a hidden field? Is there another way to hide them and not cause problems with the persistence of the data?
Any ideas would be appreciated.
Tony
|
|
|
solesz
Posts: 137
|
Posted: 08/10/2016, 12:01 PM |
|
Hi,
Hidden fields are not really hidden, they included in the web page (viewing the source will easily reveal the secret).
One method to set the control visibility to 'dynamic' then handle the visibility upon page or form or control loading. (Events)
In the update process only those fields will be affected which are phisically placed in the form during runtime other database fields stay intact.
If you need the financial data - for any i.e. calculation reason- I suggest to put them into Label controls, give them a style attribute: style='display:none'.
It will also put the sensitive data into the web page, viewing the source will reveal this also, but it won't bother the update process at least.
But again: handle it on server side, if you need calculation use remotedlookup, then either no sensitive data nor calculation method will be visible to unathorized user.
|
|
|
kirchaj
Posts: 215
|
Posted: 08/10/2016, 12:35 PM |
|
Solesz,
you were absolutely correct and confirmed the approach I had already tried. Your comments did make me think of the real problem which was with Mysql. The DB fields were set to a default of NULL, so when they didn't appear in the update they were cleared out. I changed the DB and all is working great.
Thanks for keeping me on the right track.
Tony
|
|
|
DataDoIT
|
Posted: 08/10/2016, 2:04 PM |
|
Under Project Settings -> General, make sure 'Exclude missing form
fields/parameters from data updates' is checked.
|
|
|
MichaelMcDonald
Posts: 640
|
Posted: 08/11/2016, 2:03 AM |
|
Custom Update, if field empty Do Not Update
_________________
Central Coast, NSW, Australia.
|
|
|
MichaelMcDonald
Posts: 640
|
Posted: 08/11/2016, 2:03 AM |
|
Custom Update, if field empty Do Not Update
_________________
Central Coast, NSW, Australia.
|
|
|
|