CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Making a field disabled for updates

Print topic Send  topic

Author Message
dhempy


Posts: 40
Posted: 02/07/2006, 5:11 PM

I need my users to supply a value for a field (step.abbrev) when they insert a record, but they must not be able to alter that field later. I don't mind if they can see the value when they update the record.

I've poked around in CCS for a way to disable the input field, or change it to a label, or something like that for Submit (update) operations, while leaving the form intact for Add (insert) operations. I didn't find anything promising.

I searched the docs and the forum, but found it difficult to search for this issue without getting zero or very many search results.

Any ideas?

Thanks in advance,
-dave

ps. I'm using Code Charge Studio, v 2.3.2.24, generating Perl 5.0 with Templates pages.

_________________
David Hempy
Director of Broadcast and Education Technology
Kentucky Educational Television
800-333-9764
View profile  Send private message
dhempy


Posts: 40
Posted: 02/07/2006, 5:27 PM

Okay...I might be a big dummy for overlooking an obvious solution.

I ended up creating a new page for inserts, distinct from the update page. The two are identical other than the step.abbrev field is a textbox on one and a label on the other. This works just fine, of course.

All the same, it would be tidier if I could use one page, with some sort of conditional on the field in question...particularly as that page changes over time as new fields are added and such, and both pages will need to be maintained. So, if anyone can point me to a cleaner solution, I'd be grateful.

Carry on,
-dave

_________________
David Hempy
Director of Broadcast and Education Technology
Kentucky Educational Television
800-333-9764
View profile  Send private message
WalterK
Posted: 02/07/2006, 5:57 PM

A way to accomplish this:
Put 2 Panels on your Form in the same column next to each other
In Panel1 put your Textbox.
In Panel2 Put another Textbox or Label (assign the datasource dield to it)
In BeforeShow of the Record you can test for EditMode
If EditMode
Panel1->Visible=False
Panel2->Visible=True
else the opposite.
Set Panel 1 initially False Panel2 initially True

if Panels2 contains a Textbox you can set its Format properties to disabled

(all code = pseudo code)
(and a late night post.)
O:)

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.

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.