You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, I’d like to consolidate all of the form‑creation logic into a single imperazim/form directory—merging what is today split between:
imperazim/vendor/libform
imperazim/components/ui/form
Important
Unified Directory: All form-building logic now resides in imperazim/form. This merge eliminates duplicate code and streamlines maintenance by using a single namespace for forms.
Tip
Dual API Styles: Developers can choose between a LongForm (class-based) approach or a dynamic, fluent API (using DynamicLongForm). Both approaches produce equivalent forms and can be used interchangeably according to preference.
Usage: Modal and Custom form types follow the same logic as above. The fluent API uses chained method calls (create(), setContent(), addButton(), and finally ->sendTo($player)) to build and send the form in one go.
LibForm
First, I’d like to consolidate all of the form‑creation logic into a single
imperazim/formdirectory—merging what is today split between:imperazim/vendor/libformimperazim/components/ui/formImportant
Unified Directory: All form-building logic now resides in
imperazim/form. This merge eliminates duplicate code and streamlines maintenance by using a single namespace for forms.Tip
Dual API Styles: Developers can choose between a LongForm (class-based) approach or a dynamic, fluent API (using
DynamicLongForm). Both approaches produce equivalent forms and can be used interchangeably according to preference.Class-Based LongForm Example
Sending the Form
After defining the form class, you can display it to a player with:
Fluent DynamicLongForm Example
Note
Usage: Modal and Custom form types follow the same logic as above. The fluent API uses chained method calls (
create(),setContent(),addButton(), and finally->sendTo($player)) to build and send the form in one go.