Pre-release — content may change.

WidgetsWidget Reference

editAdditionalInfo

Edit custom data fields validated against JSON schemas for people and organizations

Overview

The editAdditionalInfo widget provides a dynamic form interface for managing custom data fields validated against JSON schemas. This widget includes:

  • JSON schema-based form rendering
  • Custom field validation
  • Support for both people and organizations
  • Multi-schema support
  • Required field enforcement

Use this widget to collect additional information beyond standard profile fields, such as event registrations, surveys, member demographics, or custom organizational data.

Authentication

For People: Uses standard JWT API tokens

For Organizations: Requires widget tokens

// For person additional info
Wicket.widgets.editAdditionalInfo({
  accessToken: userJwtToken,
  resource: { type: 'people', id: personUuid },
  rootEl: container
});

// For organization additional info
Wicket.widgets.editAdditionalInfo({
  accessToken: widgetToken,  // Widget token required
  resource: { type: 'organizations', id: orgUuid },
  rootEl: container
});

See the Authentication Guide for JWT tokens or the Widget Authentication Guide for widget tokens.

Parameters

Prop

Type

Schema Configuration

The schemas parameter accepts an array of objects with the following structure:

schemas: [
  // Preferred: Use slugs
  { slug: 'national-conference' },
  { slug: 'membership-survey', resourceSlug: 'member-survey-resource' },

  // Schema inferred from resource override
  { resourceSlug: 'demographics-resource', showAsRequired: true },

  // Legacy: Use IDs (different between environments)
  { id: "abc-1234", showAsRequired: true },
  { id: "xyz-7890", resourceId: "res-6789" }
]

Schema Object Properties:

Prop

Type

Finding Schema IDs:

// Find schema ID
GET /json_schemas?filter[slug_in][]=national_conference&fields[json_schemas]=id

// Find resource ID
GET /json_schema_resources?filter[resource_type_eq][]=Person

Events

The widget emits the following events:

WIDGET_LOADED

Fired when the widget has initialized and rendered.

Payload:

Prop

Type

Data Field Structure:

{
  $schema: "schemaId",
  key: "schemaKey",
  valid: true,
  value: {
    fieldOneKey: fieldOneValue,
    fieldTwoKey: fieldTwoValue
  },
  version: 1
}

Validation Error Structure:

{
  id: "schemaId",
  key: "schemaKey",
  errors: [
    {
      message: "is a required property",
      params: { missingProperty: 'email' },
      property: ".email"
    },
    {
      message: "should be equal to one of the allowed values",
      params: { allowedValues: ['cat', 'dog'] },
      property: ".animal"
    }
  ]
}

SAVE_SUCCESS

Fired when a data field is successfully saved.

Payload:

Prop

Type

Return Value

Returns a Promise<WidgetLoadResult> that resolves with:

Prop

Type

Example

Wicket.ready(function () {
  var widgetRoot = document.getElementById('root');

  Wicket.widgets.editAdditionalInfo({
    loadIcons: false,
    apiRoot: apiRoot,
    accessToken: clientToken,
    resource: { type: "people", id: personContext.id },
    lang: "en",
    // If schemas are not provided, widget defaults to show all schemas
    schemas: [
      { slug: 'national-conference' },
      { slug: 'membership-survey', resourceSlug: 'member-survey-resource' },

      // Schema will be inferred when providing only the resource override
      { resourceSlug: 'demographics-resource', showAsRequired: true },

      // Legacy: initialize using id (different between environments)
      { id: "abc-1234", showAsRequired: true },
      { id: "xyz-7890", resourceId: "res-6789" }
    ]
  }).then(function (widget) {
    widget.listen(widget.eventTypes.WIDGET_LOADED, function (payload) {
      console.log('widget loaded:', payload);
    });
    widget.listen(widget.eventTypes.SAVE_SUCCESS, function (payload) {
      console.log(`Schema ID ${payload.dataField.$schema} updated`);
    });
  });
});

Try it Live

Configure and test the widget with your Wicket instance.

⚠️ Credentials are stored in your browser's localStorage

My Member Portal
View Embed Code

On this page