How to change the Current Record: Label

A place for users and developers of the Xataface to discuss and receive support.

How to change the Current Record: Label

Postby 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!!!
wisni1rr
 
Posts: 107
Joined: Mon Feb 13, 2012 9:03 pm

Re: How to change the Current Record: Label

Postby 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
samhans
 
Posts: 96
Joined: Fri Feb 10, 2012 1:22 am

Re: How to change the Current Record: Label

Postby 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.
wisni1rr
 
Posts: 107
Joined: Mon Feb 13, 2012 9:03 pm

Re: How to change the Current Record: Label

Postby 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
ADobkin
 
Posts: 195
Joined: Mon Oct 22, 2007 7:31 pm
Location: Atlanta, GA, USA

Re: How to change the Current Record: Label

Postby 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
wisni1rr
 
Posts: 107
Joined: Mon Feb 13, 2012 9:03 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 20 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved