Конечно, там же в ТДС
Это не полный код, в этом куске видно как добавляются 2 поля в дополнительные свойства
$author = strip_tags(Core_Array::getPost('author'

);
$email = strip_tags(Core_Array::getPost('email'

);
// Обработка вставки информационного элемента
if (Core_Array::getPost('submit_question'))
{
$Informationsystem_Controller_Show->cache(FALSE);
$siteuser_id = 0;
if (Core::moduleIsActive('siteuser'))
{
$oSiteuser = Core_Entity::factory('Siteuser')->getCurrent();
if ($oSiteuser)
{
$siteuser_id = $oSiteuser->id;
}
}
$oInformationsystem_Item = Core_Entity::factory('Informationsystem_Item');
$oInformationsystem_Item->informationsystem_group_id = $Informationsystem_Controller_Show->group;
$oInformationsystem_Item->active = Core_Page::instance()->libParams['addedItemActive'];
$oInformationsystem_Item->path = '';
$subject = nl2br(strip_tags(Core_Array::getPost('subject')));
$text = strip_tags(Core_Array::getPost('text'));
$oInformationsystem_Item->name = strlen($subject) > 0 ? $subject : '<Без темы>';
$oInformationsystem_Item->text = nl2br($text);
$oInformationsystem_Item->siteuser_id = $siteuser_id;
$author = strip_tags(Core_Array::getPost('author'));
$email = strip_tags(Core_Array::getPost('email'));
$oInformationsystem = $Informationsystem_Controller_Show->getEntity();
$oInformationsystemItems = $oInformationsystem->Informationsystem_Items;
$oInformationsystemItems->queryBuilder()
->where('ip', '=', Core_Array::get($_SERVER, 'REMOTE_ADDR'))
->orderBy('id', 'DESC')
->limit(1);
$aLastInformationsystemItem = $oInformationsystemItems->findAll();
if (!isset($aLastInformationsystemItem[0]) || time() < Core_Date::sql2timestamp($oInformationsystem_Item->datetime) + ADD_COMMENT_DELAY)
{
if ($oInformationsystem->use_captcha == 0 || $siteuser_id > 0 || Core_Captcha::valid(Core_Array::getPost('captcha_id'), Core_Array::getPost('captcha')))
{
$oInformationsystem->add($oInformationsystem_Item);
// Вставляем в дополнительные свойства автора
$oProperty = Core_Entity::factory('Property')->find(61);
if (!is_null($oProperty->id) && $author)
{
$oValue = $oProperty->createNewValue($oInformationsystem_Item->id);
$oValue->value = $author;
$oValue->save();
}
// Вставляем в дополнительные свойства email
$oProperty = Core_Entity::factory('Property')->find(Core_Page::instance()->libParams['emailPropertyId']);
if (!is_null($oProperty->id) && $email)
{
$oValue = $oProperty->createNewValue($oInformationsystem_Item->id);
$oValue->value = $email;
$oValue->save();
}
// Если пользователь зерегистрирован, получаем информацию
if ($siteuser_id)
{
$author = $oSiteuser->name && $oSiteuser->surname
? $oSiteuser->name . ' ' . $oSiteuser->surname
: $oSiteuser->login;
$email = $oSiteuser->email;
}
ob_start();
if ($oInformationsystem_Item->active == 0)
{
?>
<p>Благодарим Вас, <?php echo $author?>!
<br />Ваша запись принята. После проверки администратором она станет доступной!
</p>
<?php
}
else
{
?>
<p>Благодарим Вас, <?php echo $author?>!
<br />Ваша запись принята и опубликована!
</p>
<?php
}
$Informationsystem_Controller_Show->addEntity(
Core::factory('Core_Xml_Entity')
->name('message')->value(ob_get_clean())
);
// Отправка письма администратору
$message = "Доброе время суток, уважаемый Администратор!\n\nНа сайт, поддерживаемый системой управления сайтом HostCMS, была добавлена запись:\n";
$message .= "Автор: " . $author . "\n";
$message .= "E-mail: " . $email . "\n";
$message .= "Тема: {$oInformationsystem_Item->name}\n";
$message .= "Информационная система: ".$oInformationsystem->name."\n";
$message .= "Дата: " . Core_Date::sql2datetime($oInformationsystem_Item->datetime) . "\n";
$message .= "IP-адрес: " . $oInformationsystem_Item->ip . "\n";
$message .= "Вопрос: " . $oInformationsystem_Item->text;
$oCore_Mail_Driver = Core_Mail::instance()
->to(EMAIL_TO)
->from(Core_Valid::email($email)
? $email
: EMAIL_TO
)
->subject('Добавление информационного элемента')
->message($message)
->contentType('text/plain')
->send();
}
else
{
$Informationsystem_Controller_Show->addEntity(
Core::factory('Core_Xml_Entity')
->name('error')->value('Введен неверный код подтверждения!')
)
->addEntity(
Core::factory('Core_Xml_Entity')->name('adding_item')
->addEntity(
Core::factory('Core_Xml_Entity')->name('author')->value($author)
)->addEntity(
Core::factory('Core_Xml_Entity')->name('email')->value($email)
)->addEntity(
Core::factory('Core_Xml_Entity')->name('subject')->value($subject)
)->addEntity(
Core::factory('Core_Xml_Entity')->name('text')->value($text)
)
);
}
}
else
{
$Informationsystem_Controller_Show->addEntity(
Core::factory('Core_Xml_Entity')
->name('error')->value('Запись не может быть добавлена, т.к. прошло мало времени с момента Вашего последнего добавления вопроса!')
);
}
}
Для начала вам нужно из пост запроса получить ваши данные из поля, которое вы добавите в xsl шаблоне
$custom_text= strip_tags(Core_Array::getPost('ТУТ_name_вашего_поля'));
Затем нужно это поле добавить в дополнительные свойства элемента
// Вставляем в дополнительные свойства автора
//ТУТ НУЖНО ЗАМЕНИТЬ 61 на id вашего свойства
$oProperty = Core_Entity::factory('Property')->find(61);
if (!is_null($oProperty->id) && $custom_text)
{
$oValue = $oProperty->createNewValue($oInformationsystem_Item->id);
$oValue->value = $custom_text;
$oValue->save();
}
Как то так, надеюсь понятно объяснил