widget:type = grid
Suppose we have two tables, tbl_organisation and tbl_individuals, in the edit view for a record in the organisations table (tbl_organisations) we also want to be able to view and edit the individuals within this organisation we can use widget:type=grid
In the /tables/tbl_organisation/fields.ini we create a transient field by adding:
[Individuals]
widget:label = "Individuals"
transient=1
relationship=individuals
widget:type=grid
widget:columns="ind_firstname,ind_lastname,ind_tel"
The above assumes we have a relationship entry in our /tables/tbl_organisation/relationships.ini that looks like this:
[individuals]
__sql__ = "SELECT * FROM tbl_individual WHERE org_id='$org_id'"
The fields.ini will show the three columns shown in widget:columns from the table tbl_individual
Correct permissions need to be set to enable editing and deletion etc of these records.
var disqus_identifier = ‘xataface.com/wiki/grid’; (function() { var dsq = document.createElement(‘script’); dsq.type = ‘text/javascript’; dsq.async = true; dsq.src = ‘http://xataface.disqus.com/embed.js’; (document.getElementsByTagName(‘head’)[0] || document.getElementsByTagName(‘body’)[0]).appendChild(dsq); })(); blog comments powered by Disqus
//<![CDATA[ (function() { var links = document.getElementsByTagName(‘a’); var query = ‘?’; for(var i = 0; i < links.length; i++) { if(links[i].href.indexOf(‘#disqus_thread’) >= 0) { query += ‘url’ + i + ‘=’ + encodeURIComponent(links[i].href) + ‘&’; } } document.write(‘