diff --git a/app/javascript/template_builder/builder.vue b/app/javascript/template_builder/builder.vue index 96670b9d..ebb0f191 100644 --- a/app/javascript/template_builder/builder.vue +++ b/app/javascript/template_builder/builder.vue @@ -1320,7 +1320,11 @@ export default { if (!this.fieldsDragFieldRef.value) { if (['select', 'multiple', 'radio'].includes(field.type)) { - field.options = [{ value: '', uuid: v4() }] + if (this.dragField?.options?.length) { + field.options = this.dragField.options.map(option => ({ value: option, uuid: v4() })) + } else { + field.options = [{ value: '', uuid: v4() }] + } } if (['stamp', 'heading'].includes(field.type)) { diff --git a/app/javascript/template_builder/field.vue b/app/javascript/template_builder/field.vue index d581fc7a..b4941cf7 100644 --- a/app/javascript/template_builder/field.vue +++ b/app/javascript/template_builder/field.vue @@ -192,14 +192,14 @@ class="w-full input input-primary input-xs text-sm bg-transparent" :placeholder="`${t('option')} ${index + 1}`" type="text" - :readonly="!editable" + :readonly="!editable || defaultField" required dir="auto" @focus="maybeFocusOnOptionArea(option)" @blur="save" >