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

# Conditional Redirects

> Send users to different pages based on their submission.

Formbase does not enforce conditional redirects on its own, but you can implement them easily in your frontend or server. The idea is simple: submit to Formbase, then choose a destination based on the submitted values.

This keeps your logic close to your UI and avoids complex backend rules.

<Steps>
  <Step title="Collect the form data">
    Read values from the form using `FormData`.
  </Step>

  <Step title="Submit and redirect">
    ```js theme={null}
    const formData = new FormData(formElement);
    const plan = String(formData.get('plan') || 'free');

    const response = await fetch('https://formbase.dev/s/YOUR_FORM_ID', {
      method: 'POST',
      body: formData,
      redirect: 'manual',
    });

    if (response.status === 303 || response.ok) {
      if (plan === 'pro') {
        window.location.href = '/thanks-pro';
      } else {
        window.location.href = '/thanks-free';
      }
    }
    ```

    Any field can drive the redirect logic.
  </Step>
</Steps>

<Callout type="note">
  For server-driven routing, submit from a backend endpoint and redirect from there.
</Callout>
