> ## Documentation Index
> Fetch the complete documentation index at: https://docs.raykoi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Success Behavior

> Where a visitor goes, or what they see, right after a submission succeeds.

<Tip>
  Everything on this page is optional — a bare `<form data-raykoi data-form-id="...">` already works with sensible defaults. Read this when you want to change something specific. For the full attribute/event lookup, see [Attributes](/integrations/options-reference/attributes).
</Tip>

## See it together

Most of these in one realistic example — a redirect on success, a custom loading label, and error messages routed to their own container:

```html theme={null}
<form
  data-raykoi
  data-form-id="YOUR_PUBLIC_ID"
  data-success-url="/thanks"
  data-loading-text="Sending…"
  data-error="#form-errors"
>
  <input type="email" name="email" required>
  <div data-raykoi-error="email"></div>

  <button type="submit">Submit</button>
</form>

<div id="form-errors"></div>
```

## Success behavior

What happens right after a submission succeeds — where the visitor goes, or what they see, and whether the form clears itself.

<ParamField body="data-success-url" type="string">
  Redirect here after a successful submission. Highest priority — overrides `data-success` if both are present.
</ParamField>

<ParamField body="data-success" type="string">
  `"redirect:/thanks"` to redirect, `"inline:#thanks"` to show an inline message in that element. A bare selector (`"#thanks"`) is treated as inline; a bare URL/path is treated as a redirect, for backwards compatibility with either explicit form. Defaults to `inline:#message` — an auto-created message box right after the form.
</ParamField>

<ParamField body="data-success-message" type="string">
  Override text for the built-in inline success message. Loses to a message the server itself sent back, wins over the generic built-in fallback.
</ParamField>

<ParamField body="data-reset" type="boolean">
  Reset the form's fields after a successful submission. Present with no value.
</ParamField>
