-
Notifications
You must be signed in to change notification settings - Fork 0
/
mod_simpleform.php
29 lines (23 loc) · 928 Bytes
/
mod_simpleform.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/**
* @package Joomla.Site
* @subpackage mod_simpleform
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
// Include the menu functions only once
require_once __DIR__ . '/helper.php';
$formContents = $params->get('formcontents');
$useLabels = $params->get('uselabels');
$usePlaceholders= $params->get('useplaceholders');
$showCaptcha = $params->get('showcaptcha');
$hideAfterSubmit= $params->get('hideaftersubmit');
if ($showCaptcha){
JPluginHelper::importPlugin('captcha');
$ed = JEventDispatcher::getInstance();
$ed->trigger('onInit', 'dynamic_recaptcha_1');
}
$form = ModSimpleFormHelper::createForm($formContents, $useLabels, $usePlaceholders, $showCaptcha);
require JModuleHelper::getLayoutPath('mod_simpleform', $params->get('layout', 'default'));