ComfyCoders TranquilTools
Docs /Laravel Vue FormBuilder
Repository
v1

Configuration

Publish the config file to customize WYSIWYG and reCAPTCHA settings:

php artisan vendor:publish --tag="form-builder-config"

This creates config/form-builder.php. The file belongs to the PHP core, tranquil-tools/laravel-form-builder, which this package depends on.

An existing config/vue-form-builder.php from before the core was split out keeps working: its values are merged over form-builder.php and win. Rename the file when convenient — the old name logs a deprecation warning while APP_DEBUG is on.


Theme

The theme block sets the classes for the wrapper, label, help text and error message every field renders around its control. See Theming.


Dates

'dates' => [
    'timezone' => null,
    'validate_bounds' => false,
],

The timezone date fields with a time show and send their value in. null keeps the wall-clock value without timezone; an IANA name such as 'Europe/Amsterdam', or 'browser' for the user's own timezone, sends ISO 8601 with an offset. See Timezone.

validate_bounds makes every date field validate its minDate and maxDate on the server too, see Min and max date.


Validation

'validation' => [
    'label_attributes' => false,
],

true names fields by their label in validation messages for every form, see Labels in validation messages.


Money and translatable fields

'money' => [
    'currency' => 'EUR',
],

'translatable' => [
    'locales' => null,          // ['nl', 'en']
    'locale_names' => null,     // ['nl' => 'Vlaams'] for the validation attribute names
],

The currency of a Money field without ->currency(), the locales of a Translatable field without ->locales(), and the locale names used in validation messages ("Title (Dutch)"). See Money and Translatable.


WYSIWYG

Default editor

'wysiwyg' => [
    'default-editor' => 'quill', // any registered key, or 'textarea'
],

The default editor applies to any Wysiwyg field that does not call ->editor() explicitly.

The key must be registered in your app entrypoint, otherwise the field renders a textarea. Only textarea works without registration.

Quill options

Customize the Quill toolbar and modules under editors.quill.options:

'editors' => [
    'quill' => [
        'options' => [
            'theme' => 'snow',
            'showSourceButton' => true,
            'modules' => [
                'toolbar' => [
                    ['bold', 'italic', 'underline'],
                    [['list' => 'ordered'], ['list' => 'bullet']],
                    ['link', 'image'],
                    ['clean'],
                ],
            ],
        ],
    ],
],

Any options set here are loaded as defaults when a Wysiwyg field is instantiated. You can override them per-field with ->options([...]).

Textarea fallback editor

Add a textarea entry under editors to configure the plain-textarea fallback:

'editors' => [
    'textarea' => [
        'options' => [],
    ],
],

reCAPTCHA

'recaptcha' => [
    'site_key' => env('RECAPTCHA_SITE_KEY', ''),
    'secret_key' => env('RECAPTCHA_SECRET_KEY', ''),
    'default_action' => 'submit',
    'default_score' => 0.5,
    'enabled' => env('RECAPTCHA_ENABLED', true),
],
Key Description
site_key Public key shown in the Vue component (loads from RECAPTCHA_SITE_KEY)
secret_key Secret key used for server-side verification (loads from RECAPTCHA_SECRET_KEY)
default_action Action name sent with each reCAPTCHA token
default_score Minimum score (0.0–1.0) to pass validation. 1.0 = definitely human, 0.0 = likely bot
enabled Set to false to skip reCAPTCHA verification entirely (useful in local/test environments)

Add the keys to your .env:

RECAPTCHA_SITE_KEY=your-site-key
RECAPTCHA_SECRET_KEY=your-secret-key
RECAPTCHA_ENABLED=true

See Other Fields → Recaptcha for field-level usage.