File tree Expand file tree Collapse file tree 3 files changed +13
-9
lines changed
Expand file tree Collapse file tree 3 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -1024,15 +1024,6 @@ public function displayUserForm() : void {
10241024 ]);
10251025 // Delete saved answers if any
10261026 unset($ _SESSION ['formcreator ' ]['data ' ]);
1027-
1028- // Show validator selector
1029- if (Plugin::isPluginActive ('advform ' )) {
1030- echo PluginAdvformForm_Validator::dropdownValidator ($ this );
1031- } else {
1032- if ($ this ->validationRequired ()) {
1033- echo PluginFormcreatorForm_Validator::dropdownValidator ($ this );
1034- }
1035- }
10361027 }
10371028
10381029 /**
Original file line number Diff line number Diff line change @@ -671,6 +671,14 @@ public static function dropdownValidatorGroup(): string {
671671 *
672672 */
673673 public static function dropdownValidator (PluginFormcreatorForm $ form ): string {
674+ if (Plugin::isPluginActive ('advform ' )) {
675+ return PluginAdvformForm_Validator::dropdownValidator ($ form );
676+ }
677+
678+ if (!$ form ->validationRequired ()) {
679+ return '' ;
680+ }
681+
674682 $ validators = [];
675683 $ formValidator = new PluginFormcreatorForm_Validator ();
676684 // Validators of either user type or group type
Original file line number Diff line number Diff line change 122122 }
123123 )
124124 </script >
125+
126+ {{ call(' PluginFormcreatorForm_Validator::dropdownValidator' , [
127+ item
128+ ])| raw }}
129+
125130 <div class =" center" >
126131 {{ call(' Html::submit' , [
127132 __(' Send' ),
You can’t perform that action at this time.
0 commit comments