How to autofill recordId on TextInput in AttachAction

As the title suggests, undefined array key "recordId."

AttachAction::make()
  ->form(function () {
    return [
      TextInput::make('recordId'),
      SelectTree::make('parent_id')
        ->relationship('parent', 'name', 'parent_id)
    ];
})
Was this page helpful?