Fill Form Field Value with Suggestion from OpenAI API

Filament 4/5
Also available in Filament 3 version

This project demonstrates AI integration in Filament using OpenAI to automatically extract tags from job descriptions. An action button triggers OpenAI analysis, parses the response into tags, and auto-populates a Select field while creating any missing tags, providing a foundation for various AI-assisted data entry scenarios.

01JC09XBE9VVH07KE0KZ0BZVV4

Get the Source Code:

Only This Example

$9

One-time payment

Full source code for Fill Form Field Value with Suggestion from OpenAI API
Downloadable ZIP file with the source code
Lifetime access to this example
GitHub Sign in with GitHub to buy

Sign in first, then complete your $9 checkout.

Best value — all 168 examples

FilamentExamples Membership

$99 /year
or
$199 lifetime
Access to code of all 168 examples
Future new examples and updates included
FilaCheck Pro package licence included
MCP server included
View membership plans

30-day money-back guarantee

How it works

We have a simple form with a Multi-Select for Tags:

app/Filament/Resources/JobOffers/JobOfferResource.php

use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use App\Filament\Resources\JobOffers\Pages\ListJobOffers;
use App\Filament\Resources\JobOffers\Pages\CreateJobOffer;
use App\Filament\Resources\JobOffers\Pages\EditJobOffer;
use App\Models\JobOffer;
use Filament\Resources\Resource;
use Filament\Tables\Table;
use App\Filament\Resources\JobOffers\Schemas\JobOfferForm;
use App\Filament\Resources\JobOffers\Tables\JobOffersTable;
 
class JobOfferResource extends Resource
{
protected static ?string $model = JobOffer::class;
 
protected static string | \BackedEnum | null $navigationIcon = Heroicon::OutlinedRectangleStack;
 
public static function form(Schema $schema): Schema
{
return JobOfferForm::configure($schema);
}
 
public static function table(Table $table): Table
{
return JobOffersTable::configure($table);
}
 
public static function getRelations(): array
{
return [
//
];
}
 
public static function getPages(): array
{
return [
'index' => ListJobOffers::route('/'),
'create' => CreateJobOffer::route('/create'),
'edit' => EditJobOffer::route('/{record}/edit'),
];
}
}

And here we want to add a OpenAI query to extract these tags automatically using AI. So let's create our Action button:

The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.