I add my fields with this code
add_filter(
'hivepress/v1/forms/message_send',
function ($form) {
// Это условие убирает поля для ввода из истории сообщений (переписки между пользователями)
if ('messages_view_page' !== hivepress()->router->get_current_route_name()) {
$form['fields']['fio'] = [
'label' => 'Ф.И.О*',
'type' => 'text',
'min_length' => 6,
'max_length' => 100,
'_order' => 5,
'required' => true
];
$form['fields']['adress_pr'] = [
'label' => 'Адрес проживания*',
'type' => 'text',
'min_length' => 6,
'max_length' => 100,
'_order' => 6,
'required' => true
];
return $form;
}
}
);
I have already seen the topic on this issue, but there you just advised me to find someone for revision, and I am a developer myself, but I can’t figure out how to output these new fields so that information from these fields is shown in correspondence, I opened a template file -
/plugins/hivepress-messages/templates/message/view/message-text.php
but I don’t understand how to implement data output from new fields, can you explain in more detail where the data from these fields is stored and how to get them? my task is to add a certain number of fields and to make them appear in the correspondence.
thank you very much and I’m really waiting for an answer