# Prop options

## type

Defines prop type, valid values are **null, object, array, string, number, integer, date, boolean, id, binary**.

## $comment

Intended for notes to schema maintainers, as opposed to "description" which is suitable for display to end users.

## default

&#x20;The `default` keyword specifies a default value for an property.  Additional you can overwrite  default with `advancedDefault` keyword. With `advancedDefault` you can set default from URL query component value or from custom JavaScript code.

Bottom example first tries to set default from `http://localhost?email=`` `**`URL encoded value`** if not found it will fallback to `default` keyword.

```javascript
"email": {
  "type": "string",
  "format": "email",
  "default": "info@example.com",
  "advancedDefault": {
    "query": "email"
  }
}
```

**`default` interface**

Value must be same type as property type.

### advancedDefault

**`advancedDefault` interface**

| Parameters | Type     | Description                                                                                    |
| ---------- | -------- | ---------------------------------------------------------------------------------------------- |
| query      | `string` |                                                                                                |
| $eval      | `string` | <p>Custom JavaScript code. Code must return value.</p><p>Example: <code>return 123;</code></p> |

## const

Force value of prop. Can't be changed.

## required

If `required: true` prop value is required.

## virtual

Props that have `virtual: true` will be ignored when calling `getValue({ virtual: false})`.

## nullable

{% hint style="danger" %}
Experimental
{% endhint %}

## readonly

If `readonly: true` input field is disabled.

## writeonly

{% hint style="info" %}
Depends on your API implementation.
{% endhint %}

## searchable

{% hint style="warning" %}
Depends on APP and API implementation. Not directly used in JSF core.
{% endhint %}

```
searchable?: {

    title?: string;

    /**
     * If enabled it will be displayed to user under More button, when using advanced search.
     */
    byUser?: {

      /**
       * Only show search field if specific mode is present.
       */
      $mode?: string;
      enabled?: true;
    }
  }
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jsf.gitbook.io/jsf/schema/property-options.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
