Current Record: table #66

When using widget:type table, it will store the data as XML. So the field type must be TEXT (or varchar... but text is better). You can dec...

Current Record: table #66

When using widget:type table, it will store the data as XML. So the field type must be TEXT (or varchar... but text is better). You can dec...

table

[Permalink]

When using widget:type table, it will store the data as XML.

So the field type must be TEXT (or varchar... but text is better). You can decide which columns you want in the table by creating sub-fields in your fields.ini file as follows:

Suppose you want a column called 'name' and a column called 'url'

[myfield]
widget:type=table
[myfield:name]
[myfield:url]

Now when you access the stored value using the Dataface API, the value of myfield will be stored as an array of associative arrays. e.g.

foreach ( $record->val('myfield') as $vals){ echo $vals['name'].' -- '.$vals['url']; }
blog comments powered by Disqus
Powered by Xataface
(c) 2005-2024 All rights reserved