In a tab, there is a Varchar field that I want to contain a maximum of 20 characters.
<input type="text" maxlength="20" />
<?php
class IndexPage extends Page {
static $db = array(
'Banner1Title' => 'Varchar''
);
static $has_one = array(
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Banner", new TextField('Banner1Title','Banner 1 Title'));
return $fields;
}
}
class IndexPage_Controller extends Page_Controller {
}
?>