---
url: "https://vueda.dev/v3/reference/api/js/use/useFormModelProps.md"
title: "use/useFormModelProps"
---

# use/useFormModelProps

## Overview

Builds the props that a view binds on its `FormModel`, in the documented configuration precedence.

Three layers combine, and each later layer wins for the same key:

1. The model config's `formProps` for the view.
2. The `formProps` object that the view received.
3. The view's own form props, such as `fields` or `fieldProps`. A prop the view did not receive is
   `undefined`, and it leaves the earlier layers in place.

A later layer replaces an earlier layer's value whole. A `fieldProps` map passed to the view replaces the
model config's `fieldProps` map, and does not merge with it key by key.

`app`, `model`, and `view` select the configuration that `FormModel` reads, so the view always sets them.
The composable ignores those keys in either `formProps` layer and logs a console warning once per key.

## Properties

### FORM_MODEL_SELECTOR_PROPS {#FORM_MODEL_SELECTOR_PROPS}

Props that select which configuration `FormModel` reads. A `formProps` layer cannot set them.

Type: `typeOperator`

Source: `client/lib/use/useFormModelProps.js:21`

### VIEW_FORM_MODEL_PROPS {#VIEW_FORM_MODEL_PROPS}

View props that a view forwards to `FormModel` under the same name. A view forwards its `formModelVariant`
prop as `variant`.

Type: `typeOperator`

Source: `client/lib/use/useFormModelProps.js:27`

## Methods

- [formModelExpand](/v3/reference/api/js/use/useFormModelProps/functions/formModelExpand.md) - Returns the relations that a view's `FormModel` renders as inline fieldsets.
- [pickViewFormModelProps](/v3/reference/api/js/use/useFormModelProps/functions/pickViewFormModelProps.md) - Picks the form props that a view's options carry, keyed by `FormModel` prop name.
- [useFormModelProps](/v3/reference/api/js/use/useFormModelProps/functions/useFormModelProps.md) - Returns the props for a view's `FormModel`, merged in the documented precedence.

## Types

### [FormModelPropsOptions](/v3/reference/api/js/use/useFormModelProps/types/FormModelPropsOptions.md)

## Source

`client/lib/use/useFormModelProps.js:1`
