kangus
|
| Posted: 08/06/2002, 11:37 AM |
|
All I need to do is print the current date in the footer but I can not get it to work! I have a php function that calulates the number of days until an event and I want to display this number but since I can not get:
<? echo date(D-M-Y);?> to print from the footer html code and inserting a label and trying to assign the label a value:
Footer.date_to_be.Value=$calc_date;
I'm at a loss.
The help and web site do not show how to use anything BUT a database column as the source for any object you place.
|
|
|
 |
Henry
|
| Posted: 08/06/2002, 10:55 PM |
|
Footer.date_to_be.Value=$calc_date;
Part of the problem might be that the above code is a mixture of ASP and PHP.
Setting a field value in PHP is usually of the nature:
global $FormName;
$FormName->FieldName->SetValue("New Value");
|
|
|
 |
Nicole
|
| Posted: 08/07/2002, 7:05 AM |
|
Hello,
I suppose that Footer page is includable one. In this case in order to set any value for its fields you should declare not form name as global variable, but the name of the includable page component (you can see in on any normal page). Here is sample code for the field Before Show event (footer page):
global $footer_inc_name;
$footer_inc_name->form_name->field_name->SetValue("any val");
|
|
|
 |
JD
|
| Posted: 08/07/2002, 1:21 PM |
|
If the footer is an included page in an open event add
$calc_date = date(D-M-Y);
If you need to pull values from other tables, use the dlookup function of CC to do this. This works in CC 2.05. Not sure on CCS.
To have it display in a label field.
create a label field and call it xyz
do your calculation and set the answer to $fldxyz.
|
|
|
 |