© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
RoseRiyadh

Pivot column in many to many relationship - form builder

i have the following form:
Forms\Components\Section::make('Linked Businesses')
->schema([
Forms\Components\Select::make('businesses')
->relationship('businesses', 'name')
->multiple()
->disabled(fn ($record) => Auth::user()->role === 'business_owner'),
TextInput::make('discount_percentage') // TODO: THIS IS NOT WORKING
->label('Discount Percentage')
->numeric()
->minValue(0)
->maxValue(100)
->required()->disabled(fn ($record) => Auth::user()->role === 'business_owner'),
]),

I want to add the TextInput of discount_percentage to the create form so i can save it in the same form when i choose the business, how can i make it possible without having the following approach in the relationship manager:
Tables\Actions\AttachAction::make()
->form(fn (AttachAction $action): array => [
$action->getRecordSelect(),
Forms\Components\TextInput::make('discount_percentage')->required(),
])
])
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Form builder - trying to create/edit relationship with pivot
FilamentFFilament / ❓┊help
12mo ago
Retrieve data in pivot table many to many relationship
FilamentFFilament / ❓┊help
3y ago
Form field in relationship to pivot table
FilamentFFilament / ❓┊help
3y ago
Many-to-Many relationship Filament Table Builder V2
FilamentFFilament / ❓┊help
2y ago