Skip to content

Commit 556efcd

Browse files
committed
Fixed email error location 🐛
1 parent e5257f4 commit 556efcd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

layouts/fields/text.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
switch ($field->type) {
1313
case 'email':
1414
$attrs[] = 'data-parsley-type="email"';
15+
$attrs[] = 'data-parsley-type-message="' . JText::_("MOD_JDSCF_EMAIL_REQUIRED_ERROR") . '"';
1516
break;
1617
case 'number':
1718
$attrs[] = 'data-parsley-type="number"';

tmpl/default.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<p class="jd-simple-contact-description card-subtitle mb-2 text-muted"><?php echo JText::_($description); ?></p>
3838
<?php } ?>
3939
</div>
40-
<form method="POST" action="<?php echo JURI::root(); ?>index.php?option=com_ajax&module=jdsimplecontactform&format=json&method=submit" data-parsley-type-message="<?php echo JText::_("MOD_JDSCF_EMAIL_REQUIRED_ERROR"); ?>" data-parsley-validate data-parsley-errors-wrapper="<ul class='text-danger list-unstyled mt-2 small'></ul>" data-parsley-error-class="border-danger" data-parsley-success-class="border-success" id="simple-contact-form-<?php echo $module->id; ?>" enctype="multipart/form-data">
40+
<form method="POST" action="<?php echo JURI::root(); ?>index.php?option=com_ajax&module=jdsimplecontactform&format=json&method=submit" data-parsley-validate data-parsley-errors-wrapper="<ul class='text-danger list-unstyled mt-2 small'></ul>" data-parsley-error-class="border-danger" data-parsley-success-class="border-success" id="simple-contact-form-<?php echo $module->id; ?>" enctype="multipart/form-data">
4141
<div class="jdscf-row">
4242
<?php
4343
ModJDSimpleContactFormHelper::renderForm($params, $module);

0 commit comments

Comments
 (0)