MCPcopy Create free account
hub / github.com/docusealco/docuseal / getSourceValue

Method getSourceValue

app/javascript/elements/field_condition.js:100–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98 }
99
100 getSourceValue () {
101 const el = this.sourceEl
102
103 if (!el) return
104
105 const tag = el.tagName.toLowerCase()
106 const type = (el.getAttribute('type') || '').toLowerCase()
107
108 if (tag === 'select') return el.value
109 if (tag === 'textarea') return el.value
110 if (tag === 'input' && type === 'checkbox') return el.checked ? (el.value || '1') : null
111 if (tag === 'input') return el.value
112
113 return el.value ?? null
114 }
115
116 isEmpty (obj) {
117 if (obj == null) return true

Callers 1

checkConditionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected