Skip to content

Instantly share code, notes, and snippets.

@alfrekjv
Created December 11, 2011 03:03
Show Gist options
  • Save alfrekjv/1457967 to your computer and use it in GitHub Desktop.
Save alfrekjv/1457967 to your computer and use it in GitHub Desktop.
Category Add
<?php
$category = array
(
'category' => array
(
'action' => 'category/add',
'method' => 'post',
'legend' => 'Add Category',
'class' => 'span10',
'fields' => array
(
'supplier_id' => array
(
'id' => 'supplier_id',
'type' => 'text',
'label' => 'Supplier ID:'
),
'parent_id' => array
(
'id' => 'parent_id',
'type' => 'text',
'label' => 'Parent:'
),
'title' => array
(
'id' => 'title',
'type' => 'text',
'label' => 'Title:'
),
'supplier' => array
(
'id' => 'supplier',
'type' => 'text',
'label' => 'Supplier:'
),
'active' => array
(
'id' => 'active',
'type' => 'hidden',
'value' => '1'
),
'level' => array
(
'id' => 'level',
'type' => 'hidden',
'value' => null
)
),
'actions' => array(
'Cancel' => array(
'class' => 'btn',
'id' => 'cancel',
'label' => 'Cancel',
'type' => 'reset',
'redirect' => "{$baseUrl}category/index"
),
'Ok' => array(
'class' => 'btn primary',
'id' => 'ok',
'label' => 'Ok'
)
)
)
);
echo $forms->createFromArray( $category );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment