Skip to content

Commit 4b050f3

Browse files
Added Custom template loading functionality
Co-Authored-By: Hitesh Aggarwal <5124120+hiteshaggarwal@users.noreply.github.com>
1 parent 24952f0 commit 4b050f3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

helper.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ public static function getLabelText($field) {
5353

5454
public static function getFieldLayout($type) {
5555
$return = '';
56-
if (file_exists(JPATH_SITE . '/modules/mod_jdsimplecontactform/layouts/fields/' . $type . '.php')) {
56+
if (file_exists(JPATH_SITE . '/modules/mod_jdsimplecontactform/layouts/fields/' . $type . '-custom.php')) {
57+
// For adding custom files
58+
$return = $type . '-custom';
59+
} else if (file_exists(JPATH_SITE . '/modules/mod_jdsimplecontactform/layouts/fields/' . $type . '.php')) {
5760
$return = $type;
5861
} else {
5962
$return = 'text';

0 commit comments

Comments
 (0)