Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Conform · Pipe

form.update

form.update provides an intent for changing a field or form value through a Conform control. Its generated button props support nested/list updates and can clear validation errors.

How it works

form.update creates an intent for changing a field or the entire form. Supply the target field name and replacement value through getButtonProps; use the validated option to control whether existing errors are cleared. Inputs must use their field metadata key so React can remount them with the new initial value.

Syntax

form.update.getButtonProps({ name?, value?, validated? })

Parameters

NameTypeDescription
namestringName of the field to modify; omit it when applying the update to the whole form.
valueunknownReplacement value for the selected field or fieldset.
validatedbooleanWhether the updated target remains validated; set to false to clear all errors.

Returns

Button props for a Conform update intent.

Key points

  • The update intent changes a field in response to a form control action.
  • A field name and structured value can update nested fields and list entries.
  • Use getButtonProps to produce the attributes needed for a button-driven update.

Common mistakes

  • Inputs need the field metadata key; otherwise React may not remount them when the updated initial value changes.

Example: Update a field

<button
  {...form.update.getButtonProps({
    name: fields.agenda.name,
    value: {
      title: 'My agenda',
      description: 'This is my agenda',
    },
  })}
>
  Update field
</button>

A button generated by Conform updates the agenda field, including nested or list fields, when activated.

When to use it

Field replacement

Replace a field or fieldset value from a button action.

Nested and list updates

Apply structured data to nested or list fields.

Error clearing

Remove current validation errors while changing form state.

Interview questions

QWhat is form.update used for?

form.update is an intent helper for modifying a field or fieldset. Its button props serialize the target name and replacement value into a form control.

Follow-up: How would you update the entire form? Omit the name option and provide the new form value.

QWhich options are commonly passed to form.update.getButtonProps?

Pass name to identify the field and value to provide its replacement value. The documented helper also supports nested and list fields.

Follow-up: How can an update clear all errors? Use the update intent with validated: false and no field name.

QWhy must inputs use the field metadata key?

The field's metadata key must be assigned to its input. Conform uses that key to notify React to remount the input with the updated initial value.

Follow-up: Why is remounting useful here? It lets the controlled or uncontrolled input receive the new initial value after the intent runs.

  • form.reset
  • form.validate
  • form.insert
  • form.remove
  • form.reorder
  • useForm

Source: Intent button. Checked 2026-10-15.