From 4d51c4b9e1152cff57ef4b0b557ce527dd3e34b5 Mon Sep 17 00:00:00 2001 From: Troy Presley Date: Tue, 21 May 2024 17:59:59 -1000 Subject: [PATCH] update readme --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6c4077d..357ebc8 100644 --- a/README.md +++ b/README.md @@ -623,12 +623,13 @@ RootComponent.model = { Another very common task in web pages and browser applications is to work with form inputs. Unfortunately, the logic and stream plumbing required to do this routine task can be challenging to developers new to observables (and is frustrating even for most veterans). Sygnal's processForm() helper function takes any HTML form element, and automatically extracts the values from all input fields contained within it. By default processForm() listens to both 'input' and 'submit' events, but can be configured to listen to any combination of standard or custom events on the form itself or its inputs. -The Observable from `processForm` always returns objects with the current value of every field in the form, so the following will print something like: +The Observable from `processForm` always returns objects with the current value of every field in the form along with the name of the JS event that initiated it, so the following will print something like: ```javascript { - 'first-name': 'First', - 'last-name': 'Last' + 'first-name': 'Bob', + 'last-name': 'Smith', + eventType: 'submit' } ```