@@ -51,7 +51,7 @@ class ExtraField extends Model
51
51
'extra_field_type ' ,
52
52
//Enable this when field_loggeable is introduced as a table field (2.0)
53
53
//'field_loggeable',
54
- 'created_at ' ,
54
+ 'created_at '
55
55
];
56
56
57
57
public $ ops = [
@@ -514,7 +514,8 @@ public function addElements(
514
514
$ addEmptyOptionSelects = false ,
515
515
$ introductionTextList = [],
516
516
$ requiredFields = [],
517
- $ hideGeoLocalizationDetails = false
517
+ $ hideGeoLocalizationDetails = false ,
518
+ $ help = false
518
519
) {
519
520
if (empty ($ form )) {
520
521
return false ;
@@ -562,7 +563,8 @@ public function addElements(
562
563
$ customLabelsExtraMultipleSelect ,
563
564
$ addEmptyOptionSelects ,
564
565
$ introductionTextList ,
565
- $ hideGeoLocalizationDetails
566
+ $ hideGeoLocalizationDetails ,
567
+ $ help
566
568
);
567
569
568
570
if (!empty ($ requiredFields )) {
@@ -1038,7 +1040,8 @@ public function set_extra_fields_in_form(
1038
1040
$ customLabelsExtraMultipleSelect = [],
1039
1041
$ addEmptyOptionSelects = false ,
1040
1042
$ introductionTextList = [],
1041
- $ hideGeoLocalizationDetails = false
1043
+ $ hideGeoLocalizationDetails = false ,
1044
+ $ help = false
1042
1045
) {
1043
1046
$ jquery_ready_content = null ;
1044
1047
if (!empty ($ extra )) {
@@ -1102,8 +1105,13 @@ public function set_extra_fields_in_form(
1102
1105
}
1103
1106
1104
1107
$ translatedDisplayText = get_lang ($ field_details ['display_text ' ], true );
1108
+ $ translatedDisplayHelpText = '' ;
1109
+ if ($ help ) {
1110
+ $ translatedDisplayHelpText .= get_lang ($ field_details ['display_text ' ] . 'Help ' );
1111
+ }
1112
+ $ label = [$ translatedDisplayText , $ translatedDisplayHelpText ];
1105
1113
if (!empty ($ translatedDisplayText )) {
1106
- $ field_details ['display_text ' ] = $ translatedDisplayText ;
1114
+ $ field_details ['display_text ' ] = $ label ;
1107
1115
}
1108
1116
1109
1117
switch ($ field_details ['field_type ' ]) {
@@ -1129,6 +1137,7 @@ public function set_extra_fields_in_form(
1129
1137
}
1130
1138
break ;
1131
1139
case self ::FIELD_TYPE_TEXTAREA :
1140
+
1132
1141
$ form ->addHtmlEditor (
1133
1142
'extra_ ' .$ field_details ['variable ' ],
1134
1143
$ field_details ['display_text ' ],
@@ -1139,6 +1148,7 @@ public function set_extra_fields_in_form(
1139
1148
'Width ' => '100% ' ,
1140
1149
'Height ' => '130 ' ,
1141
1150
'id ' => 'extra_ ' .$ field_details ['variable ' ],
1151
+
1142
1152
]
1143
1153
);
1144
1154
$ form ->applyFilter ('extra_ ' .$ field_details ['variable ' ], 'stripslashes ' );
0 commit comments