Skip to content

Commit 9a38c54

Browse files
committed
fix: Add missing input for field description
fix #40
1 parent 66240a3 commit 9a38c54

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

src/CustomForm.template.php

+23
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,29 @@ function showimage(f)
306306
<dl id="post_header">';
307307
}
308308

309+
function template_callback_field_text(): void
310+
{
311+
global $context, $scripturl, $txt;
312+
313+
echo '
314+
</dl>
315+
<dl id="post_header">
316+
<dt>
317+
', $txt['customform_text'], '
318+
<p>', $txt['customform_text_desc'], '</p>
319+
</dt>
320+
<dd>
321+
<div id="bbcBox_message"></div>
322+
<div id="smileyBox_message"></div>';
323+
324+
template_control_richedit('field_text', 'smileyBox_message', 'bbcBox_message');
325+
326+
echo '
327+
</dd>
328+
</dl>
329+
<dl id="post_header">';
330+
}
331+
309332
function template_customform_GeneralSettings(): void
310333
{
311334
template_show_settings();

src/CustomForm/ManageCustomForm.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -541,10 +541,6 @@ public function editField(int $field_id): void
541541
'text_label' => $txt['customform_identifier'],
542542
'help' => 'customform_field_title',
543543
],
544-
[
545-
'callback',
546-
'field_text',
547-
],
548544
[
549545
'select',
550546
'field_type',
@@ -581,12 +577,16 @@ public function editField(int $field_id): void
581577
)
582578
],
583579
[
584-
'text',
580+
'large_text',
585581
'field_type_vars',
586582
'value' => $data['type_vars'],
587583
'text_label' => $txt['customform_type_vars'],
588584
'help' => 'customform_type_vars',
589585
],
586+
[
587+
'callback',
588+
'field_text',
589+
],
590590
];
591591
add_integration_function('integrate_sceditor_options', __NAMESPACE__ . '\Integration::sce_options2', false);
592592
require_once $this->sourcedir . '/Subs-Editor.php';

0 commit comments

Comments
 (0)