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 -> PHP

 Hide image in record form?

Print topic Send  topic

Author Message
FERAD
Posted: 05/09/2004, 7:03 AM

How is it possible to hide a row in the record form if the field is a null or 0 value? This is for display purposes not edit mode.
eg. if an image field is blank then do not show the image.


aradi

Posts: 66
Posted: 05/09/2004, 10:55 AM

Hi,

Try this in the BeforeShow Event

if ($ImageRecordForm->imageFieldControlName->GetValue() =="") $ImageRecordForm->imageFieldControlName->Visible = false;


I have not tried it , but should work.
View profile  Send private message
Steve
Posted: 05/14/2004, 2:37 PM

From CCS Help (Image Reference):

---------------------------------------

Run-Time Properties (PHP)
Property Description
Visible - Specifies whether the image is visible. Setting this property to false will prevent the object from being displayed (however the image icon will remain in the generated page)

-------------------------------------

Then what good is it if "Visible = False" really means "Visible = KindaSorta".
itguy


Posts: 3
Posted: 07/14/2004, 6:44 AM

I'm also trying to achive this and unfortunately aradis' Before show event still leaves the image icon.

It must be possible as they have this working on the "My Profile" page of this site
View profile  Send private message
peterr


Posts: 5971
Posted: 07/14/2004, 10:17 PM

Right-click on the image and select "Edit Image...", then set the "Extended HTML" option. After that the event should work.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
itguy


Posts: 3
Posted: 07/15/2004, 12:14 AM

Perfect!!!

Thanks.
View profile  Send private message
Damian Hupfeld
Posted: 11/24/2004, 8:32 PM

I used something like this code, in conjuction with the Extended HTML on the image:

global $news;
// Write your own code here.
// Hide image if the database value for "pic" is blank
if ($news->pic->GetValue() =="") $news->pic->Visible = false;

regards
Damian
http://www.nexthost.com.au

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.

Web Database

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.