Skip to content

Instantly share code, notes, and snippets.

@talfco
Created February 18, 2012 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talfco/1858148 to your computer and use it in GitHub Desktop.
Save talfco/1858148 to your computer and use it in GitHub Desktop.
BP1: Global Fields Definition
<?php
require_once($_SERVER['DOCUMENT_ROOT'].'/include/base.php');
// For each Business Object of the application (= $busobject) a global field
// variable is defined with contains meta information about each field
// which will be rendered in the content detail view as well as its form
// The file containing the definitions will be located in the frontend/coursetype
// directory
$busobject = "coursetype";
// First index is the flow on the form
$fields = array (
1 => array ("name" => "tag",
"note" => true,
"type" => "text",
"rules" => array ( 1 => 'required', 2 => 'regexp'),
"editfield_class" => "jeip-editfield edit-content-h1"),
2 => array ("name" => "name",
"note" => false,
"type" => "text",
"rules" => array ( 1 => 'required'),
"editfield_class" => "jeip-editfield edit-content-h1"),
3 => array ("name" => "description",
"note" => false,
"type" => "text",
"rules" => null,
"editfield_class" => null),
4 => array ("name" => "nrlessons",
"note" => true,
"type" => "text",
"rules" => array ( 1 => 'digits', 2 => 'length'),
"editfield_class" => null)
);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment