private function init_fields_array() { $fields = array(); $lang = LangLoader::get('config', 'contact'); $field = new ContactField(); $field->set_name($lang['mail_address']); $field->set_field_name('f_sender_mail'); $field->set_description($lang['mail_address_explain']); $field->set_field_type('ContactShortTextField'); $field->set_regex(4); $field->readonly(); $field->required(); $field->not_deletable(); $fields[1] = $field->get_properties(); $field = new ContactField(); $field->set_name($lang['contact_subject']); $field->set_field_name('f_subject'); $field->set_description($lang['contact_subject_explain']); $field->set_field_type('ContactShortTextField'); $field->not_deletable(); $fields[2] = $field->get_properties(); $field = new ContactField(); $field->set_name($lang['contact_recipients']); $field->set_field_name('f_recipients'); $field->set_field_type('ContactSimpleSelectField'); $field->set_possible_values(array('admins' => array('is_default' => true, 'title' => $lang['contact_recipients_admins'], 'email' => ''))); $field->not_deletable(); $field->not_displayed(); $fields[3] = $field->get_properties(); $field = new ContactField(); $field->set_name($lang['message']); $field->set_field_name('f_message'); $field->set_field_type('ContactHalfLongTextField'); $field->readonly(); $field->required(); $field->not_deletable(); $fields[4] = $field->get_properties(); return $fields; }