diff --git a/inc/question.class.php b/inc/question.class.php
index 340b149cb..31c19a588 100644
--- a/inc/question.class.php
+++ b/inc/question.class.php
@@ -841,28 +841,36 @@ public function showForm($ID, $options = []) {
echo '
';
// required
echo '';
- echo ' | ';
- echo '';
+ echo ' | ';
+ echo ' ';
dropdown::showYesNo('required', $this->fields['required'], -1, [
'rand' => $rand,
]);
+ echo ' ';
echo ' | ';
// show empty
echo '';
- echo '';
+ echo ' ';
+ echo '';
echo __('Show empty', 'formcreator');
echo '';
+ echo ' ';
echo ' | ';
- echo '';
+ echo ' | ';
+ echo ' ';
dropdown::showYesNo('show_empty', $this->fields['show_empty'], -1, [
'rand' => $rand,
]);
+ echo ' ';
echo ' | ';
echo '
';
diff --git a/js/scripts.js.php b/js/scripts.js.php
index c57e398b2..42abd710b 100644
--- a/js/scripts.js.php
+++ b/js/scripts.js.php
@@ -1084,15 +1084,8 @@ function plugin_formcreator_changeQuestionType(rand) {
return;
}
- $('#label_required').toggle(response.may_be_required);
- $('#plugin_formcreator_required > [name="required"]').toggle(response.may_be_required);
-
- $('#label_show_empty').toggle(response.may_be_empty);
- $('#plugin_formcreator_show_empty > [name="show_empty"]').toggle(response.may_be_empty);
-
- $('#plugin_formcreator_subtype_label').html(response.label);
- $('#plugin_formcreator_subtype_value').html(response.field);
-
+ $('.plugin_formcreator_required').toggle(response.may_be_required);
+ $('.plugin_formcreator_mayBeEmpty').toggle(response.may_be_empty);
plugin_formcreator_updateQuestionSpecific(response.additions);
});
}