CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 [RESOLVED] hiding elements of a form

Print topic Send  topic

Author Message
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
View profile  Send private message
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.
View profile  Send private message
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
View profile  Send private message
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: 638
Posted: 08/11/2016, 2:03 AM

Custom Update, if field empty Do Not Update
_________________
Central Coast, NSW, Australia.

View profile  Send private message
MichaelMcDonald

Posts: 638
Posted: 08/11/2016, 2:03 AM

Custom Update, if field empty Do Not Update
_________________
Central Coast, NSW, Australia.

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.