Typeform-style conversational forms for Filament. One question at a time, fully in your Laravel app.
Warning
This package is in early development (0.x). The API may change before v1.0.0. See the roadmap.
- 23 question types, one per screen, with a progress bar and welcome and end screens.
- Keyboard first: Enter to continue, letter and number shortcuts, auto-advance after a choice.
- Logic: jumps, conditions, multiple endings and scores, checked again on the server.
- Build in code or in a no-code builder inside your Filament panel.
- No theme setup. Dark mode, mobile and accessibility are built in.
- PHP 8.2+
- Laravel 12 or 13
- Filament 5.11+
composer require jaocero/conversational-forms
php artisan filament:assetsThat's it. No custom theme or Vite changes needed. Run php artisan filament:assets again after every update of the package.
Add a Conversation to any Filament form and handle the answers in your Livewire component:
use Filament\Schemas\Schema;
use JaOcero\ConversationalForms\Components\Conversation;
use JaOcero\ConversationalForms\Livewire\Concerns\InteractsWithConversation;
use JaOcero\ConversationalForms\Livewire\ConversationResult;
use JaOcero\ConversationalForms\Questions\Email;
use JaOcero\ConversationalForms\Questions\MultipleChoice;
use JaOcero\ConversationalForms\Questions\ShortText;
use JaOcero\ConversationalForms\Screens\EndScreen;
class Onboarding extends Page
{
use InteractsWithConversation;
public ?array $data = [];
public function mount(): void
{
$this->form->fill();
}
public function form(Schema $schema): Schema
{
return $schema
->statePath('data')
->components([
Conversation::make([
ShortText::make('name')->label("What's your name?")->required(),
Email::make('email')->label('Nice to meet you, {name}! Your email?')->required(),
MultipleChoice::make('plan')
->label('Which plan are you interested in?')
->options(['starter' => 'Starter', 'team' => 'Team', 'enterprise' => 'Enterprise']),
])->endScreen(EndScreen::make()->title('Thanks, {name}!')),
]);
}
protected function handleConversationSubmission(array $data, ConversationResult $result): void
{
Lead::create($data); // the plugin never stores anything, you decide
}
}On a Filament Page, render it with EmbeddedSchema::make('form') in the page's content() schema.
There are 23 question types, and any other Filament field works inside a conversation too.
| Group | Questions |
|---|---|
| Text | ShortText, LongText, Email, Website, Phone, Number |
| Choice | MultipleChoice, PictureChoice, Dropdown, YesNo, Checkbox, LegalConsent |
| Scales | OpinionScale, Nps, Rating, Matrix, Ranking |
| Date and time | DateQuestion, TimeQuestion |
| Details | ContactInfo, Address |
| Files and media | FileUpload, Signature, AudioAnswer, VideoAnswer |
Use Statement, QuestionGroup and HiddenField to structure a conversation. See all questions and options.
Decide where to go after each answer:
use JaOcero\ConversationalForms\Logic\Logic;
MultipleChoice::make('plan')
->options([...])
->logic([
Logic::when('plan', 'is', 'enterprise')->jumpTo('company_size'),
Logic::when('plan', 'is', 'none')->end(),
]);Conditions, scores, endings and show/hide are covered in the logic guide.
Serve a full-screen conversation at a public URL, no panel or login needed:
class JobApplication extends ConversationPage
{
public function conversation(Conversation $conversation): Conversation
{
return $conversation->components([/* ... */]);
}
}
Route::livewire('/apply', JobApplication::class);See public pages.
Let your team build conversations in a Filament panel, with a live preview, logic, publishing and response analytics:
$panel->plugin(ConversationalFormsPlugin::make());php artisan conversational-forms:installSee the builder.
- Questions: every question type and conversation option
- Logic: jumps, conditions, scores, endings and saving answers
- Public pages
- The builder: responses, sharing, spam protection and events
- Theming: bundled themes and CSS variables
- Testing
- Keyboard, accessibility and troubleshooting
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.
