Forms

Forms class handles various form actions within BigCommerce, such as registration, address updates, product reviews, and more.

It registers form handlers and provides functionality to process form actions, handle errors, success messages, redirects, and messaging. This class is part of the container and utilizes dependency injection to manage the various handlers for each action.

  • Full name: \BigCommerce\Container\Forms
  • Parent class: Provider

Constants

ConstantVisibilityTypeValue
DELETE_ADDRESSpublicstring’forms.delete_address’
REGISTERpublicstring’forms.register’
REVIEWpublicstring’forms.review’
UPDATE_ADDRESSpublicstring’forms.update_address’
UPDATE_PROFILEpublicstring’forms.update_profile’
GIFT_CERTIFICATEpublicstring’forms.purchase_gift_certificate’
ERRORSpublicstring’forms.errors’
SUCCESSpublicstring’forms.success’
REDIRECTSpublicstring’forms.redirects’
MESSAGINGpublicstring’forms.messaging’
SWITCH_CURRENCYpublicstring’forms.switch_currency’

Methods

register

Registers all the form actions and handlers into the container.

public register(\Pimple\Container $container): mixed

This method sets up actions for handling form submissions, errors, success, redirects, and messaging.

Parameters:

ParameterTypeDescription
$container\Pimple\ContainerThe dependency injection container.


Automatically generated on 2025-01-21