Repository navigation
Extending
Written against v0.5.3.
The add-on has three extension points, each an interface in the UAMSWeb\Aether\Forms\Settings\Contracts namespace that a host or another package binds in a service provider.
SubmissionContext carries a request across the queue. A notification sent from a worker cannot see the submitter's request. A host that keeps that context binds its own implementation of the interface:
-
capture(Submission $submission): ?arrayruns when the form is submitted and returns a plain array that serializes onto the job, ornull. -
during(array $context, callable $send): mixedmakes that context active while the email is sent, and returns what$sendreturns.
The add-on's default binding captures nothing. The submission_data switch binds one that carries the request's IP address, referrer, query parameters and site (see Save submission data). A host's own binding is kept.
SubmissionSite names the site a submission was made from, for the _site_* metadata and the captured context: forSubmission(?Submission $submission = null): Site. The default answers with the current site. A host whose form endpoint sits under one site's prefix binds an implementation that names the site of the submitting page.
FormSettingsSection adds a section to the form settings screen: section(Form $form): array returns the section definition. Tag an implementation with FormSettingsSection::TAG (aether-form-settings.sections) in a service provider's register(), and the screen shows it after the add-on's own sections, while the control_panel switch is on.
- Configuration: the switches that turn each feature on and off.
- Form settings screen: the sections the add-on adds.
Home | Getting started | Guides | Troubleshooting | Reference | README | Repository
Written against v0.5.3. Edit these pages in docs/wiki/ through a pull request; edits made in the wiki are overwritten by the next publish.
Getting started
Guides
- Send notifications
- Choose what visitors see after submitting
- Close a form on a date
- Score a quiz
- Score a survey
- Save submission data
- Turn a feature off
Troubleshooting
Reference
- Configuration
- Form settings screen
- Restriction states
- Conditional logic
- Merge tags
- Quiz and survey tags
- Fieldtypes
- Extending the add-on
- README
Project