Hi,
i’m trying to get my head around using a custom tv. i want to use a grid with several columns, where the user can create and delete entries.
so, i tried to follow all the available instructions and tutorials and this is what i got so far:
file: core/model/modx/processors/element/tv/renders/mgr/input/myTV.php
<div id="tv5-form"></div>
<input type="hidden" id="tv5" name="tv5" value="'.htmlspecialchars($data_json).'" />
<script type="text/javascript">
// <![CDATA[
var myData = [
['Apr 12, 2010', '', 'Some text', 'http://example.com']
];
var ds = new Ext.data.Store({
proxy: new Ext.data.MemoryProxy(myData),
reader: new Ext.data.ArrayReader({}, [
{name: "Datum", type: "date", dateFormat: "M j, Y"},
{name: "Datum 2"},
{name: "Text"},
{name: "Link"}
])
});
ds.load();
Ext.onReady(function() {
MODx.load({
xtype: "modx-grid-local",
data: ds
});
});
// ]]>
</script>
all i get is the <div> and <input> and a javascript error:
b is undefined
http://....../ext3/ext-all.js row 7
can you give me a pointer where i’m being daft?