Current Record: Directly modifying a table's attributes #73

News

Current Record: Directly modifying a table's attributes #73

News

Click to minimize this section Details

News id 73
Headline Directly modifying a table's attributes
Content While using the fields.ini is a good way to set attributes such as widget:label, description, etc sometimes you need more control. This can be accomplished by loading the table in the code and then directly modifying the fields. For example:br /br /blockquotebr /$usersTable =amp; Dataface_Table::loadTable(#39;users#39;);br /$myfield =amp; $usersTable-gt;getField(#39;password#39;);br /$myfield[#39;widget#39;][#39;description#39;] = quot;Hello worldquot;;br //blockquotebr /br /The first line of code is retrieving a reference to the users table which is a Xataface table object. The table object comes with some functions that allow you with. One of them being the getField() function which would then retrieve a reference to the password field variable. From there we can access the widget attributes using arrays.
Image (Empty)
Date posted Wed Nov 12 17:42:00 2008
Posted by noreply@blogger.com (Fong Chun Chan)
Status Approved
Categories Blog
Source id Fong's Blog
Source url http://fongxataface.blogspot.com/2008/11/directly-modifying-tables-attributes.html
Powered by Xataface
(c) 2005-2024 All rights reserved