CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Changing code while dessigning

Print topic Send  topic

Author Message
Hidran
Posted: 06/27/2002, 6:22 AM

Hello, I want to change in a form the type of an input according to the user: For example : I want to show a form with 3 textboxes, but I want only the logged in user to access the textbox he can update or delete and no the others. My idea is changing the textbox type to label. How can I do it programming with php .
I tried changing in the php generated file in the function before show:
$user=CCGetUserLogin();
switch($user){
CASE 'S':

$this->install = new clsControl(ccsTextBox, "install", "Install", ccsText, "", CCGetRequestParam("install", $Method));//
$this->request = new clsControl(ccsLabel, "request", "Request", ccsText, "", CCGetRequestParam("request", $Method));//Here I change it to label
break;
case 'f':

$this->install = new clsControl(ccsLabel, "install", "Install", ccsText, "", CCGetRequestParam("install", $Method));
$this->request = new clsControl(ccsTextBox, "request", "Request", ccsText, "", CCGetRequestParam("request", $Method));// In this case I change the other way around.
}


But on the html doesnt happen anything , it remain with the same design for every user:

SECOND: i TRIED CHANGING THE CODE ON THE DISIGN SCREEN BUT IT DOESNT DISPLAY ON THE DEIGN AREA.
Chris K.
Posted: 06/27/2002, 11:01 AM

This isn't working because you don't change template contents for those two cases as well. Although you change control to textbox, still the HTML template contains {install} variable not <input type="text" name="install" value="{install}">.

As I answered you before best way would be to craate bothe controls sets, modify template to enclose it with block and show it using parse and show methods if applicable. Future CCS releases will support Visible properties for blocks and controls.
EMG
Posted: 06/27/2002, 11:08 AM

Chris K. -
When will the next CCS version be released?
Chris K.
Posted: 06/27/2002, 11:35 AM

Hard to tell, it's been not a month from the first release, so it *could* take few another months for new version to appear. I'm not sure.

Chris

   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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