ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Set site in form submission

Open NeoIsRecursive opened this issue 2 years ago • 0 comments

Would be nice to be able to set the site/lang the validator should use in the request when submitting.

We use Statamic headlessly and because of that the form is always validated in the default sites lang/locale, which is not what we want.

Example of solution

    fetch('some-statamic-form', {
        method: 'POST'
        headers,
        body: {
           ...data,
           site: 'swedish'
        }
    })

Would use the swedish sites locale when validating the form

NeoIsRecursive avatar May 22 '23 09:05 NeoIsRecursive