diff --git a/app/javascript/application.js b/app/javascript/application.js
index 0ecf3be28..95911c0e5 100644
--- a/app/javascript/application.js
+++ b/app/javascript/application.js
@@ -233,7 +233,8 @@ safeRegisterElement('template-builder', class extends HTMLElement {
currencies: (this.dataset.currencies || '').split(',').filter(Boolean),
acceptFileTypes: this.dataset.acceptFileTypes,
showTourStartForm: this.dataset.showTourStartForm === 'true',
- nativeApp: this.dataset.nativeApp === 'true'
+ nativeApp: this.dataset.nativeApp === 'true',
+ nativeIos: this.dataset.nativeIos === 'true'
})
this.component = this.app.mount(this.appElem)
diff --git a/app/javascript/template_builder/builder.vue b/app/javascript/template_builder/builder.vue
index 553a6d0b4..af3780022 100644
--- a/app/javascript/template_builder/builder.vue
+++ b/app/javascript/template_builder/builder.vue
@@ -886,6 +886,7 @@ export default {
isPaypalConnected: this.isPaypalConnected,
withFormula: this.withFormula,
withConditions: this.withConditions,
+ nativeIos: this.nativeIos,
withCustomFields: this.withCustomFields,
isInlineSize: this.isInlineSize,
defaultDrawFieldType: this.defaultDrawFieldType,
@@ -1108,6 +1109,11 @@ export default {
required: false,
default: false
},
+ nativeIos: {
+ type: Boolean,
+ required: false,
+ default: false
+ },
withFieldsSearch: {
type: Boolean,
required: false,
diff --git a/app/javascript/template_builder/field_context_menu.vue b/app/javascript/template_builder/field_context_menu.vue
index 0ab8f1dde..91cea3968 100644
--- a/app/javascript/template_builder/field_context_menu.vue
+++ b/app/javascript/template_builder/field_context_menu.vue
@@ -515,7 +515,7 @@ export default {
ContextSubmenu,
ContextModal
},
- inject: ['t', 'getFieldTypeIndex', 'template', 'withCustomFields', 'currencies', 'dateFormats', 'locale'],
+ inject: ['t', 'getFieldTypeIndex', 'template', 'withCustomFields', 'currencies', 'dateFormats', 'locale', 'withFormula', 'withConditions', 'nativeIos'],
props: {
contextMenu: {
type: Object,
@@ -608,10 +608,10 @@ export default {
return !['stamp', 'heading', 'strikethrough'].includes(this.field.type)
},
showCondition () {
- return this.withCondition && !['stamp', 'heading'].includes(this.field.type)
+ return this.withCondition && (this.withConditions || !this.nativeIos) && !['stamp', 'heading'].includes(this.field.type)
},
showFormula () {
- return this.field.type === 'number' || this.field.type === 'payment' || !!this.field.preferences?.formula
+ return (this.field.type === 'number' || this.field.type === 'payment' || !!this.field.preferences?.formula) && (this.withFormula || !this.nativeIos)
},
showRequired () {
return this.withRequired && !['phone', 'stamp', 'verification', 'strikethrough', 'heading'].includes(this.field.type)
diff --git a/app/javascript/template_builder/field_settings.vue b/app/javascript/template_builder/field_settings.vue
index ef76d2b03..91c4ff093 100644
--- a/app/javascript/template_builder/field_settings.vue
+++ b/app/javascript/template_builder/field_settings.vue
@@ -484,7 +484,7 @@