How to get the label of a widget?

33 views
Skip to first unread message

Richard Mücke

unread,
Mar 13, 2025, 7:11:17 AMMar 13
to Xataface
Hi,

I don't know how to get the properties of fields I defined in the fields.ini.

Example fields.ini
[fieldname]
widget:label = "Testlabel"
widget:description = "Testdescription"

How can I get the label if I know the tablename and the fieldname in the database.

So I want something like this:
$label = $table[tablename]->field[fieldname];

This should set $label to "Testlabel".

How do I do this?

Thanks for yur help.

Best regards
Richard

Richard Mücke

unread,
Dec 28, 2025, 11:11:13 AM (2 days ago) Dec 28
to Xataface
Solution:
$table->getFieldProperty('widget:label', 'mein_feld');

Example:
       $app =& Dataface_Application::getInstance();
       $app->_table =& Dataface_Table::loadTable($tablename);
       $label = $app->_table->getFieldProperty('widget:label', $field);
       $visbrowse = $app->_table->getFieldProperty('visibility:browse', $field);

Reply all
Reply to author
Forward
0 new messages