【发布时间】:2020-02-07 03:09:34
【问题描述】:
我希望通过添加一个 HTML 选择列表来轻微更改以下默认 PHP 配置的 HTML 输出,即 MediaWiki 扩展 ContactPage。
这是我的LocalSettings.php 文件中可用的整个默认 PHP 配置:
wfLoadExtension( 'ContactPage' );
$wgContactConfig['default'] = array(
'RecipientUser' => 'WikiUser', // Must be the name of a valid account which also has a verified e-mail-address added to it.
'SenderName' => 'Contact Form on ' . $wgSitename, // "Contact Form on" needs to be translated
'SenderEmail' => null, // Defaults to $wgPasswordSender, may be changed as required
'RequireDetails' => true, // Either "true" or "false" as required
'IncludeIP' => false, // Either "true" or "false" as required
'MustBeLoggedIn' => true, // Check if the user is logged in before rendering the form
'AdditionalFields' => array(
'Text' => array(
'label-message' => 'emailmessage',
'type' => 'textarea',
'rows' => 20,
'required' => true, // Either "true" or "false" as required
),
),
// Added in MW 1.26
'DisplayFormat' => 'table', // See HTMLForm documentation for available values.
'RLModules' => array(), // Resource loader modules to add to the form display page.
'RLStyleModules' => array(), // Resource loader CSS modules to add to the form display page.
);
我已阅读扩展程序的 README file,但我不清楚如何在代码中添加如下所示的 HTML 选择列表:
<select name="fruit">
<option value ="none">Nothing</option>
<option value ="guava">Guava</option>
<option value ="lychee">Lychee</option>
<option value ="papaya">Papaya</option>
</select>
作为一名非 PHP 程序员,我问,如何在 PHP 中包含这样一个 HTML 选择列表?
【问题讨论】:
标签: php html output mediawiki contact-form