Page 1 of 1

How to change the Current Record: Label

PostPosted: Wed Feb 15, 2012 10:54 am
by wisni1rr
I am wondering how I would go about changing the Current Record: Label?

In my application, I would like it to display 2 database fields.

For example:
By Default,
The Current Record Label shows "MAIN ST" based on my field [StreetName].

I would like it to display "123 MAIN ST" based on 2 fields [StreetNo] & [StreetName].

Thanks for helping a newbie. This is a fantastic software package!!!

Re: How to change the Current Record: Label

PostPosted: Wed Feb 15, 2012 11:40 am
by samhans
use fields.ini in your tables folder.
like [street_name]
widget:label = Street Name
widget:description = " enter the street Name"

samhans

Re: How to change the Current Record: Label

PostPosted: Wed Feb 15, 2012 12:06 pm
by wisni1rr
Thanks for your reply.

I understand how to do what you have described in your previous post. What I'm trying to do is a little different.

Under the details section of a table there is a label called 'Current Record:'

I can change what appears after the label by setting the fields.ini to:
title = 1

However I need the 'Current Record:' label to show TWO fields as the title, not one.

Re: How to change the Current Record: Label

PostPosted: Thu Feb 16, 2012 12:17 am
by ADobkin
This page should help:

http://xataface.com/documentation/tutor ... te_classes

See: Example 1: Creating a custom title for records

Alan

Re: How to change the Current Record: Label

PostPosted: Thu Feb 16, 2012 11:22 am
by wisni1rr
Alan,

Thank you! That was exactly what I was looking for.

The first example worked well.
Changing the description doesn't seem to work. I notice no visible change to the titleColumn()

Code: Select all
<?
class tables_GENERAL {

   function getTitle(&$record){
      return $record->val('StreetNo').' '.$record->val('StreetName');
   }

   function titleColumn(){
      return "City";
   }
}

?>


Rich