Nooku Guides

Load a Form to Edit Todos

What good is a management level component if you can't edit the data. Let get into the steps you need to follow to get that working.

When you click the "Todo item one" link in the items view , a 500 error should be generated.

The template "com://admin/todo.item.default.html" cannot be located.

Note: If you put debugging on in Configuration a lot more info is available.

This error should be Expected. Remember, the layout file is the only thing we absolutely need to explicitly write for a given html view.

We can go ahead and create a new template file


And enter the following code

<?= helper('behavior.koowa'); ?>

<form action="<?= route('id='.$item->id) ?>" method="post" class="-koowa-form">
        <input  type="text" name="title" id="title" size="40" maxlength="255"
                value="<?= $item->title; ?>"
                placeholder="<?= translate( 'Title' ); ?>" />
    <?= helper('editor.display', array(
                        'name' => 'description',
                        'id' => 'description',
                        'width' => '100%',
                        'height' => '300',
                        'cols' => '60',
                        'rows' => '20',
                        'value' => $item->description

We should end up with something which is similar to this

Todos List With Toolbar

Awesome! We have a form, but no buttons to tell our application to save our Todos. Lets take care of that in the next section.