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 -> General/Other

 allow/prevent updating fields in a record

Print topic Send  topic

Author Message
chris

Posts: 16
Posted: 05/14/2004, 7:39 AM

Hi,

how do you prevent certains fields of being updated ? Depending on the group a user belongs to (user or admin), I want them to be able to update a certain field on a record.
I tried setting the Visible-property to false, this will hide the contents of the field, but you're still able to modify the contents of the field ?
Is there a way to prevent the field from displaying, or display the content, but prevent modification ?
My current solution is creating a seperate page, with a record, where I use labels instead of textboxes.

thx,

Chris

WInXP IIS/MySQL / PHP
View profile  Send private message
peterr


Posts: 5971
Posted: 05/14/2004, 9:40 AM

You can hide the while field by setting its Visible property to False, however you then also need to right-click on the field, click "Edit" and set its "Extended HTML" property.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
chris

Posts: 16
Posted: 05/16/2004, 9:20 AM

Peterr,

thx for the answer, setting the 'Extended HTML' will definitely hide the field, but when I hit the update-button; the result is as if a blank was entered !?
For the moment I use a different page, with certain fields ommited. The behaviour I want is the following, from a list we select a record; if belonginig to (security-) group A, I have full access and I can update all fields; if however I belong to group B, I can only update certain fields !
My initial idea was hiding them ... ideally I like to have those fields changed to 'Labels', so I can see the content but not change it ?

Do know any alternaive methods how to come to this behaviour ?

thx,

Chris
View profile  Send private message
peterr


Posts: 5971
Posted: 05/17/2004, 10:48 AM

Hidden fields do not send any values to the program (they no longer exist in the HTML) but if the form was designed by including such fields then it will utilize whatever values are sent to it from HTML, which in this case are blank.
Couple possible solutions:
- save form values into session variables and then read them and reassign as field values after the form is submitted (Before Insert).
- create several similar forms for different user groups and hide the forms that users shouldn't see
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
chris

Posts: 16
Posted: 05/18/2004, 3:55 AM

Peter,

I'll use the second option; I was allready using this as a fallback solution.
Just wondering, if there were a simpler, more elegant solution.

Chris
View profile  Send private message
Sixto Luis Santos
Posted: 05/18/2004, 4:37 AM

Chris,

We've created a server action to handle this. Visit RexDesign
(http://ccs.ath.cx) and check the "Custom Server Actions: Field-level
Security" tutorial.

Regards,

Sixto

"chris" <chris@forum.codecharge> wrote in message
news:240a4da38e735e@news.codecharge.com...
> Hi,
>
> how do you prevent certains fields of being updated ? Depending on the
group a
> user belongs to (user or admin), I want them to be able to update a
certain
> field on a record.
> I tried setting the Visible-property to false, this will hide the contents
of
> the field, but you're still able to modify the contents of the field ?
> Is there a way to prevent the field from displaying, or display the
content,
> but prevent modification ?
> My current solution is creating a seperate page, with a record, where I
use
> labels instead of textboxes.
>
> thx,
>
> Chris
>
> WInXP IIS/MySQL / PHP
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


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.