Filament: Quiz/Questionnaire with Wizard Steps

Custom Page with Filament form using Wizard to create a quiz and calculate the quiz result.


Get the Source Code:

How it works

The whole logic and functionality here live inside a custom Page in Filament called Questionnaire:

  • It retrieves the questions from the database
  • It created a Filament Form dynamically based on the questions
  • It validates the form and calculates the result
  • Simple check in the view for the form and result on the same page

Let's take a look at the Page:


use App\Models\Question;
use Filament\Forms\Components\Radio;
use Filament\Forms\Components\Wizard;
use Filament\Forms\Form;
use Filament\Pages\Page;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\HtmlString;
class Questionnaire extends Page
protected static ?string $navigationIcon = 'heroicon-o-document-text';
// ...
The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.
Get the Source Code: All 50 Premium Examples for $99 Only Form Examples for $39