> ## Documentation Index
> Fetch the complete documentation index at: https://flex-fields.bjanczak.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Examples target Filament 5. Verify optional dependencies before configuring integrations.
> Upload transfer completion, permanent storage and record acceptance are separate milestones. Native and Spatie image conversions retain the original.

# Build forms, tables and infolists

> Render declared family schemas through the matching builder and request context.

> [!TIP]
>
> **Watch this in the workshop:** [36:12 — render matching table and infolist views](https://www.youtube.com/watch?v=m4V_R7YxTP4\&t=2172s) · [59:42 — introduce the family schema adapter](https://www.youtube.com/watch?v=m4V_R7YxTP4\&t=3582s).

```php theme={"theme":{"light":"github-light","dark":"github-dark"}}
use Bjanczak\FilamentFlexFields\Support\Components\Schema\FamilyRenderContext;
use Bjanczak\FilamentFlexFields\Support\Components\Schema\FamilySchemaDefinition;
use Bjanczak\FilamentFlexFields\Support\FlexFieldFormBuilder;
use Bjanczak\FilamentFlexFields\Support\Schema\FlexFieldInfolistBuilder;
use Bjanczak\FilamentFlexFields\Support\Schema\FlexFieldTableBuilder;
use Illuminate\Support\Facades\Auth;

$definition = new FamilySchemaDefinition(
    family: 'acme-name-family',
    slug: 'contact_name',
    label: 'Contact name',
    config: ['maxLength' => 120],
    configurationVersion: 2,
    isRequired: true,
);

$context = new FamilyRenderContext(
    ownerKey: 'customer-form:'.$customer->getKey(),
    statePathPrefix: 'attributes',
    locale: 'pl',
    applicationDefaults: ['maxLength' => 150],
    panelDefaults: ['maxLength' => 130],
    userKey: Auth::check() ? (string) Auth::id() : null,
    tenantId: (string) $tenant->getKey(),
);

$field = app(FlexFieldFormBuilder::class)->makeComponent(
    $definition,
    familyContext: $context,
);

$column = app(FlexFieldTableBuilder::class)->makeColumn(
    $definition,
    'attributes',
    $context,
);

$entry = app(FlexFieldInfolistBuilder::class)->makeEntry(
    $definition,
    'attributes',
    $context,
);
```

Use `build()` for lists. Built-in `FlexFieldDefinition` and `FamilySchemaDefinition`
can coexist in those lists. The built-in `FieldType` enum remains unchanged.
Table and infolist values read the selected record state path. Your adapter may
configure its usual formatting callback. Set context defaults for the family being
rendered; other families reject unknown option names. Supply a distinct stable
`ownerKey` when the same logical definition appears in several forms. Locale and
theme are available to your adapter/factory; they do not mutate global application
locale or theme.

## Continue reading

[Extension guides](https://flex-fields.bjanczak.com/docs/extensions.md) · [Definition and registration reference](https://flex-fields.bjanczak.com/docs/extensions/definition-reference.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.