cofi

cofi

  • Docs
  • Form Demos
  • Components Demos
  • Layout Demos
  • Editor
  • GitHub

›Form Class

Getting started

  • Introduction

Form Class

  • Installation
  • Overview
  • Arguments
  • Id
  • Data
  • Fields
  • Path
  • Component
  • Formatter & Parser
  • Dependencies
  • Required
  • Validators
  • Exclude Term
  • Disable Term
  • Require Term
  • Dependencies Change
  • Context
  • Dirty
  • Invalid
  • Errors
  • Processing
  • Pending Actions
  • Hooks
  • Term
  • Log
  • Error Codes
  • Actions
  • Definition Shorthand

Advanced Usages

  • Grid Usage
  • Form Persistency
  • Undo & Redo
  • Replay Actions
  • Track Actions
  • Server Validation
  • Entity Templates
  • Folder Structure

React Form

  • Installation
  • Overview
  • Form
  • Field
  • Components
  • Layout
  • Demos

Tools

  • Editor
  • DevTools

More Info

  • Test Cofi
  • Packages
  • Why Cofi?
  • Technologies
  • Videos
  • Channels

Contribute

  • Code of Conduct
  • Contributing Guide
  • Contributors

Path

Each field controls a specific part of the form's model data, which determines by the field's path.

Field Path

model.fields.someField.path - required string. Represent an object path to a specific value in the model data.

Example

// for data of
data: {
  email: 'rachel.green@friends.com',
  address: {
    home: '90 Bedford Street, NYC',
    work: 'Central Perk coffee shop, 199 Lafayette Street, NYC',
  },
  hobbies: ['DANCE', 'SHOP'],
  friends: [{
    firstName: 'Ross',
    lastName: 'Geller',
  }],
}

// path supports the following formats:
path: 'email' | 'address.home' | 'hobbies' | 'hobbies[1]', 'friends[0].firstName'
← FieldsComponent →
  • Field Path
  • Example
cofi
Copyright © 2021 Verizon Media
DOCS
IntroductionForm ClassReact FormReact ComponentsReact Layout
DEMOS
React FormReact ComponentsReact Layout
CONTRIBUTING
Code Of ConductContributing GuideContributorsUsers
CHANNELS
StarGitHubStack OverflowMediumVideos