Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Labels/Titles API > Methods

Labels/Titles API: setFieldLabel

Scroll Prev Next More

 

Sets the field label.

Syntax

Labels::setFieldLabel($table, $field, $label, $language)

Arguments

$table

the table name.

$field

the field name.

$label

a new field label.  Labels can be set in the Label Editor.

$language

the language of the field. If the $language parameter is not specified, the current language is used.

Return value

No return value.

Example

Labels can be set in the Label Editor. This example shows how to change the "descr" field label of the "carscars" table to "New Description" for the current language.

 

Note: You can use this code in the AfterAppInit, AfterTableInit, BeforeProcess events.

 

Labels::setFieldLabel("carscars", "descr", "New Description");

See also:

Labels/Titles API: getFieldLabel()

Miscellaneous settings: Label Editor

About Labels/Titles API

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software