CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Change Control Type Programmatically

Print topic Send  topic

Author Message
datadoit.com
Posted: 05/29/2004, 2:36 PM

CCS2; PHP; MySQL

Is there a way to set the control type programmatically?

Ex:

if (CCGetSession(GroupID) == "1") {
$form->field1->ControlType = Label;
}
else {
$form->field1->ControlType = TextBox;
}

-MikeR

Sixto Luis Santos
Posted: 05/29/2004, 4:20 PM

Hello Mike,

No, that's not possible. But we posted a server action at RexDesign that
effectively produce the effect you are after. Please refer to the "Field
Level Security" tutorial at http://ccs.ath.cx.

Regards,

Sixto

"datadoit.com" <mike@datadoit.com> wrote in message
news:c9avpg$bbc$1@news.codecharge.com...
> CCS2; PHP; MySQL
>
> Is there a way to set the control type programmatically?
>
> Ex:
>
> if (CCGetSession(GroupID) == "1") {
> $form->field1->ControlType = Label;
> }
> else {
> $form->field1->ControlType = TextBox;
> }
>
> -MikeR
>
>

datadoit.com
Posted: 05/30/2004, 4:52 AM

Well, the Field Level Security server action is nothing short of
spectacular. I can see where I'll use it like it is in many a place. Thank
you very much!

However, this action from what I can tell just hides the control based on
the user's security group. For my situation, I'd still like to display the
field, just not allow any inserts/updates to the field. So one of the ways
I thought of accomplishing what I need was to just create a label AND a text
box for every field, then check for user security in the BeforeShow for each
label. If the label is shown, then don't show the text box. If the label
is not shown, then show the text box. I'm assuming I could still use your
extension and subsequently check for the label's Visible property?

With the Field Level Security extension, I think that in addition to the
"label to display" in place of the hidden label, you could add a "Control to
display" (?).

Hope this makes sense.

-MikeR

"Sixto Luis Santos" <sixto@tecnoapoyo.com> wrote in message
news:c9b5r2$srv$1@news.codecharge.com...
> Hello Mike,
>
> No, that's not possible. But we posted a server action at RexDesign that
> effectively produce the effect you are after. Please refer to the "Field
> Level Security" tutorial at http://ccs.ath.cx.
>
> Regards,
>
> Sixto
>
> "datadoit.com" <mike@datadoit.com> wrote in message
>news:c9avpg$bbc$1@news.codecharge.com...
> > CCS2; PHP; MySQL
> >
> > Is there a way to set the control type programmatically?
> >
> > Ex:
> >
> > if (CCGetSession(GroupID) == "1") {
> > $form->field1->ControlType = Label;
> > }
> > else {
> > $form->field1->ControlType = TextBox;
> > }
> >
> > -MikeR
> >
> >
>
>


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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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