//------------------------------
// create
//------------------------------
function view_atArcheology_create($_post, $_user, $_conf)
{
// Must be logged in to create a record
jrUser_session_require_login();
jrUser_check_quota_access('atArcheology');
// Bring in language
jrUser_load_lang_strings();
$_lang = jrCore_get_flag('jr_lang');
// Start our create form
jrCore_archeology_banner(1);
// Form init
$_tmp = array(
'submit_value' => 2,
'cancel' => jrCore_is_profile_referrer()
);
jrCore_form_create($_tmp);
// Archeology Title
$_tmp = array(
'name' => 'archeology_title',
'label' => 3,
'help' => 4,
'type' => 'text',
'validate' => 'not_empty',
'required' => true
);
jrCore_form_field_create($_tmp);
// Archeology Location (profile or main site)
// NOTE: master admin only
$_opt = array(
0 => $_lang['atArcheology'][15],
1 => $_lang['atArcheology'][16]
);
$_tmp = array(
'name' => 'archeology_location',
'group' => 'master',
'label' => 13,
'help' => 14,
'type' => 'select',
'options' => $_opt,
'default' => 1,
'validate' => 'number_nn',
'min' => 0,
'max' => 1,
'required' => false
);
jrCore_form_field_create($_tmp);
// Archeology Body
$_tmp = array(
'name' => 'archeology_body',
'label' => 5,
'help' => 6,
'type' => 'editor',
'validate' => 'allowed_html',
'required' => true
);
jrCore_form_field_create($_tmp);
// Include Header
$_tmp = array(
'name' => 'archeology_header',
'label' => 22,
'help' => 23,
'type' => 'checkbox',
'default' => 'on',
'validate' => 'onoff',
'required' => true
);
jrCore_form_field_create($_tmp);
// Item Features
$_tmp = array(
'name' => 'archeology_features',
'label' => 24,
'help' => 25,
'type' => 'checkbox',
'default' => 'on',
'validate' => 'onoff',
'required' => true
);
jrCore_form_field_create($_tmp);
// Display record with form in it
jrCore_archeology_display();
}
Thanks for the help
--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3
updated by @the-patria-company: 10/26/16 08:11:20AM