MCPcopy Create free account
hub / github.com/cryptii/cryptii / setFieldValue

Method setFieldValue

src/Form.js:131–138  ·  view source on GitHub ↗

* Sets named field. * @param {string} name Field name * @param {mixed} value Field value * @throws {Error} If no field is assigned to given field name. * @return {Form} Fluent interface

(name, value)

Source from the content-addressed store, hash-verified

129 * @return {Form} Fluent interface
130 */
131 setFieldValue (name, value) {
132 const field = this.getField(name)
133 if (field === null) {
134 throw new Error(`There is no field assigned to the name '${name}'.`)
135 }
136 field.setValue(value)
137 return this
138 }
139
140 /**
141 * Returns the current field value for each visible form field.

Callers 3

setFieldValuesMethod · 0.95
Form.jsFile · 0.80
setSettingValueMethod · 0.80

Calls 2

getFieldMethod · 0.95
setValueMethod · 0.45

Tested by

no test coverage detected