diff --git a/client/components/forms/BarcodeInput.vue b/client/components/forms/BarcodeInput.vue
index 97232434..e652af87 100644
--- a/client/components/forms/BarcodeInput.vue
+++ b/client/components/forms/BarcodeInput.vue
@@ -10,6 +10,7 @@
>
@@ -109,6 +110,10 @@ export default {
props: {
...inputProps,
+ decoders: {
+ type: Array,
+ default: () => []
+ }
},
setup(props, context) {
diff --git a/client/components/forms/components/CameraUpload.vue b/client/components/forms/components/CameraUpload.vue
index 9dfe0f90..07eb11f3 100644
--- a/client/components/forms/components/CameraUpload.vue
+++ b/client/components/forms/components/CameraUpload.vue
@@ -117,6 +117,10 @@ export default {
type: Boolean,
default: false
},
+ decoders: {
+ type: Array,
+ default: () => []
+ }
},
emits: ['stopWebcam', 'uploadImage', 'barcodeDetected'],
data: () => ({
@@ -174,14 +178,7 @@ export default {
},
},
decoder: {
- readers: [
- "ean_reader",
- "ean_8_reader",
- "code_128_reader",
- "code_39_reader",
- "upc_reader",
- "upc_e_reader"
- ]
+ readers: this.decoders || []
},
locate: true
}, (err) => {
diff --git a/client/components/open/forms/OpenFormField.vue b/client/components/open/forms/OpenFormField.vue
index ed8a3b98..816e125e 100644
--- a/client/components/open/forms/OpenFormField.vue
+++ b/client/components/open/forms/OpenFormField.vue
@@ -339,6 +339,10 @@ export default {
inputProperties.columns = field.columns
}
+ if (field.type === 'barcode') {
+ inputProperties.decoders = field.decoders
+ }
+
if (['select','multi_select'].includes(field.type) && !this.isFieldRequired) {
inputProperties.clearable = true
}
diff --git a/client/components/open/forms/fields/components/FieldOptions.vue b/client/components/open/forms/fields/components/FieldOptions.vue
index cbfba69f..91d46c92 100644
--- a/client/components/open/forms/fields/components/FieldOptions.vue
+++ b/client/components/open/forms/fields/components/FieldOptions.vue
@@ -77,6 +77,27 @@
/>
+
+
+
+
+
+
decoder.value)
}
}
if (this.field.type in defaultFieldValues) {