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.
|
 |
 |
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
|
 |
 |
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 |
 |
 |
itguy
Posts: 3
|
| Posted: 07/15/2004, 12:14 AM |
|
Perfect!!!
Thanks.
|
 |
 |
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
|
|
|
 |