Skip to content

Config file

Any setting can be set in config/basin.php, which overrides the Control Panel. Settings set there are shown as read-only on the settings screen.

config/basin.php
<?php
use craft\helpers\App;
return [
'apiKey' => '$BASIN_API_KEY',
'projectId' => App::env('BASIN_PROJECT_ID'),
'navLabel' => 'Forms',
'allowDeletion' => false,
];

Like other Craft config files, it can have per-environment values:

config/basin.php
<?php
return [
'*' => [
'apiKey' => '$BASIN_API_KEY',
],
'dev' => [
'cacheDuration' => 0,
],
];
Key Type Default
apiKey string '' An environment variable reference, e.g. '$BASIN_API_KEY', or App::env('BASIN_API_KEY'). Never write the key itself here: config files are usually committed.
projectId string '' The Basin project ID, or an environment variable reference.
navLabel string '' The Control Panel menu label. Blank means “Basin”.
showUnreadBadge bool true Show the unread count in the menu.
allowDeletion bool false Allow permanent deletion of submissions.
autoProtect bool true Add spam protection automatically.
recaptchaVersion 'v3' or 'v2' 'v3' The site’s reCAPTCHA version.
cacheDuration int 300 Seconds to cache forms from Basin.
trackMissingForms bool true Keep the error log.
recaptchaV3SiteKey string Basin’s key Only change if Basin changes its reCAPTCHA v3 key.
recaptchaV2SiteKey string Basin’s key Only change if Basin changes its reCAPTCHA v2 key.
hcaptchaSiteKey string Basin’s key Only change if Basin changes its hCaptcha key.