text input relationShip

Hello, I can't get my quote via the form.
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\Group::make()
->schema([
Forms\Components\Section::make(__('quote-resource.section.client_information'))
->schema([
Forms\Components\TextInput::make('quote.name')
->label(__('quote-resource.field.name'))
->required()
->maxLength(255),
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\Group::make()
->schema([
Forms\Components\Section::make(__('quote-resource.section.client_information'))
->schema([
Forms\Components\TextInput::make('quote.name')
->label(__('quote-resource.field.name'))
->required()
->maxLength(255),
I'm in my resource, I don't understand why I can't get my quote since it works in my table.
Solution:
```php public static function form(Form $form): Form { return $form ->schema([...
Jump to solution
6 Replies
Vp
Vp9mo ago
Use Select in form because TextInput is not meant for relationship
Becker Maxime
Becker Maxime9mo ago
I'd like to use a textInput, I have a relationship between invoice and estimate, and I'd like the text input to load the estimate data when I open my EditRecord invoice.
einnlleinhatt_
einnlleinhatt_9mo ago
Can you add a value() ?
toeknee
toeknee9mo ago
You need to pass in a group as a relationship
Solution
toeknee
toeknee9mo ago
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\Group::make()
->schema([
Forms\Components\Section::make(__('quote-resource.section.client_information'))
->relationship('quote')
->schema([
Forms\Components\TextInput::make('name')
->label(__('quote-resource.field.name'))
->required()
->maxLength(255),
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\Group::make()
->schema([
Forms\Components\Section::make(__('quote-resource.section.client_information'))
->relationship('quote')
->schema([
Forms\Components\TextInput::make('name')
->label(__('quote-resource.field.name'))
->required()
->maxLength(255),
Becker Maxime
Becker Maxime9mo ago
Thanks you !