For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /examples/forms.md.

Signal Forms

A membership form built with Angular's Signal Forms, with a field of every kind: text, a number, a select, a date, a switch and a checkbox. Look here to wire @angular/forms/signals into an AngularLynx app.

What it shows

  • form() — builds the form from a signal model, with required(), maxLength(), min(), max() and minDate() rules. See Forms.
  • [formField] — binds Lynx's <input type="number">, which gives the form a number, and the Input, Select, Date Picker, Switch and Checkbox components.
  • Touched — each error shows once the person is done with its field: a text field when it loses focus, the checkbox when it's tapped, the select and the date when their sheet closes.
  • Constraints — the form's maxLength() reaches the name field, and its minDate() fades the past days in the date picker.
  • submit() — marks every field touched, runs the action only when the form is valid, and otherwise focuses the first field with an error with focusBoundControl().