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

 Dynamically Changing Field Captions

Print topic Send  topic

Author Message
Alan
Posted: 03/14/2002, 10:03 AM

How would you dynamically change a field caption based on some value? For example, in the Book Store example, I would like to show the "Checkout" link only if there is a shopping cart total > 0.
Nicole
Posted: 03/15/2002, 2:21 AM

Alan,
- in template version define field caption like {link}
in BeforeShow event depending on the condition assign real value to it, e.g.:
PHP
if (condition)
$tpl->set_var("link", "Checkout");
else
$tpl->set_var("link", "");

- in templateless version define field caption as <?=$link?> and again in BeforeShow event assign it a value. E.g.:
if (condition)
$link = "Checkout";
else
$link = "";

   


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.