diff --git a/ui/components/UIDynamicForm.vue b/ui/components/UIDynamicForm.vue index b1089d5..d5d0f6e 100644 --- a/ui/components/UIDynamicForm.vue +++ b/ui/components/UIDynamicForm.vue @@ -3,7 +3,7 @@

-

{{ this.props.name}}

+

{{ this.props.name }}

@@ -15,6 +15,17 @@ > {{ createComponent(field).innerText }} +
+

{{ field.label }}

+ +

+ {{ field.customForm ? JSON.parse(field.customForm).hint : undefined }} +

+
- + {{ action.label }}
@@ -201,6 +216,7 @@ export default { }, }; case 'number': + const step = field.customForm ? JSON.parse(field.customForm).step : undefined; return { type: 'FormKit', props: { @@ -209,6 +225,7 @@ export default { label: field.label, required: field.required, value: field.defaultValue, + step: step, help: hint, wrapperClass: '$remove:formkit-wrapper', inputClass: `input-${this.theme}`, @@ -457,20 +474,20 @@ export default { case 'range': const customForm = JSON.parse(field.customForm); return { - type: 'FormKit', + type: 'v-slider', props: { - type: 'range', id: field.id, - label: field.label, + // label: field.label, required: field.required, - value: field.defaultValue, - help: hint, + // value: field.defaultValue, + // help: hint, min: customForm.min, max: customForm.max, - step: customForm.step, //step is not supported by formkit free version - wrapperClass: '$remove:formkit-wrapper', - inputClass: `input-${this.theme}`, - innerClass: `${this.theme == 'dark' ? '$remove:formkit-inner' : ''}`, + step: customForm.step, + thumbLabel: true, + // wrapperClass: '$remove:formkit-wrapper', + // inputClass: `input-${this.theme}`, + // innerClass: `${this.theme == 'dark' ? '$remove:formkit-inner' : ''}`, }, }; case 'tel': @@ -490,6 +507,7 @@ export default { }, }; case 'textarea': + const rows = field.customForm ? JSON.parse(field.customForm).rows : undefined; return { type: 'FormKit', props: { @@ -498,6 +516,7 @@ export default { label: field.label, required: field.required, value: field.defaultValue, + rows: rows, help: hint, placeholder: placeholder, wrapperClass: '$remove:formkit-wrapper',