* Submits the nearest ancestor that is a FormKit "form". It determines which * node is a form by locating an ancestor where node.props.isForm = true. * * @param node - A FormKitNode | FormKitNode * * @internal
(node: FormKitNode)
| 3048 | * @internal |
| 3049 | */ |
| 3050 | function submit(node: FormKitNode): void { |
| 3051 | const name = node.name |
| 3052 | do { |
| 3053 | if (node.props.isForm === true) break |
| 3054 | if (!node.parent) error(106, name) |
| 3055 | node = node.parent |
| 3056 | } while (node) |
| 3057 | if (node.props.id) { |
| 3058 | submitForm(node.props.id, node.props.__root) |
| 3059 | } |
| 3060 | } |
| 3061 | |
| 3062 | /** |
| 3063 | * Reset to the original value. |
nothing calls this directly
no test coverage detected