How to change the Current Record: Label

Archived from the Xataface Users forum.

wisni1rr — Wed Feb 15, 2012 10:54 am

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


samhans — Wed Feb 15, 2012 11:40 am

use fields.ini in your tables folder.
like [street_name]
widget:label = Street Name
widget:description = “ enter the street Name”

samhans


wisni1rr — Wed Feb 15, 2012 12:06 pm

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.


ADobkin — Thu Feb 16, 2012 12:17 am

This page should help:

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

See: Example 1: Creating a custom title for records

Alan


wisni1rr — Thu Feb 16, 2012 11:22 am

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