Deprecated Context API

Context functions that have been deprecated and will be fully removed in a future SDK release

KeyTypeDescription

getFieldValues

function

Fetch all of the form and hidden field values of the current user.

setFieldValues

function

Pass in an object of the shape {<fieldId>: <fieldValue>} to update the user's form field and hidden field values.

getFormFields

() => fieldData

Returns information for all fields in the form.

fieldData Definition

The object keys are unique field IDs, defined in the Feathery dashboard. They map to objects that store additional field-specific information, defined below.

KeyTypeDescription

displayText

optional string

Text to display to your user along with the field

type

string enum

Field type (e.g. textarea, checkbox, etc.)

value

optional polymorphic

User-submitted value for this field. null if no submission, Promise<File> if file submission, Base64 string if signature, array of values if repeated.

options

{value: string, label?: string}[]

Allowed options to choose from, if the field specifies them (e.g. dropdown, radio buttons, etc.)

fieldData example

{
  age: {
    displayText: 'How old are you?',
    type: 'integer_field',
    value: 21 
  },
  photo_id: {
    displayText: 'Upload a photo of your ID',
    type: 'rich_file_upload',
    value: Promise<File>
  }
}

Last updated