Skip to content

getAdditionalFieldsForRegistration(): Promise<AdditionalField[] | null>

The getAdditionalFieldsForRegistration is an asynchronous method that allows to get custom additional fields for the registration form which can then be iterated over and rendered.

Returned value

A returned value has a type of Promise<AdditionalField[] | null>. You can read more about AdditionalField model here.

Example

In this example we make a AuthenticationApi call to get the additional fields for the registration.

useStorefront(async (storefront) => {
    const authenticationApi = await storefront.getApi('AuthenticationApi');

    const additionalFields = await authenticationApi.getAdditionalFieldsForRegistration();
});

Authentication API methods reference

Models reference