Thank You page in Lead Capture

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cloudmiami
    Junior Member
    • Jul 2025
    • 8

    #1

    Thank You page in Lead Capture

    The URL to redirect after form submission takes me to api/v1/LeadCapture instead of Thank You page or home page.

    Here is my ContactPage.tsx code

    <div className="bg-light p-6 md-8 rounded-lg shadow-lg">
    {/* --- EspoCRM Form Embed Section --- */}
    {/* This form will submit directly to your EspoCRM Lead Capture API endpoint. */}
    <form action="https://cloudmiami.net/api/v1/LeadCapture/21cd...........d4c2c0" method="POST" className="my-custom-form-styles">
    {/* Optional: If you encounter issues, try uncommenting this hidden ID field,
    using the ID from the "Web Form URL" in your EspoCRM Lead Capture settings:*/
    <input type="hidden" name="id" value="6876eda.....0ca23" />
    }
    {/* If EspoCRM generates a security token, it would go here as a hidden input. */}

    <div className="mb-4"> {/* Tailwind class for margin-bottom */}
    <label htmlFor="firstName" className="block text-gray-700 text-sm font-bold mb-2">First Name</label>
    <input
    type="text"
    id="firstName"
    name="firstName"
    className="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focusutline-none focus:shadow-outline"
    placeholder="John"
    required
    />
    </div>

    <div className="mb-4">
    <label htmlFor="lastName" className="block text-gray-700 text-sm font-bold mb-2">Last Name</label>
    <input
    type="text"
    id="lastName"
    name="lastName"
    className="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focusutline-none focus:shadow-outline"
    placeholder="Doe"
    required
    />
    </div>

    <div className="mb-4">
    <label htmlFor="emailAddress" className="block text-gray-700 text-sm font-bold mb-2">Email Address</label>
    <input
    type="email"
    id="emailAddress"
    name="emailAddress"
    className="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focusutline-none focus:shadow-outline"
    placeholder="john.doe@example.com"
    required
    />
    </div>

    <div className="mb-6">
    <label htmlFor="description" className="block text-gray-700 text-sm font-bold mb-2">Your Message</label>
    <textarea
    id="description"
    name="description"
    className="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focusutline-none focus:shadow-outline h-32 resize-none"
    placeholder="I have a question about..."
    ></textarea>
    </div>

    <div className="flex items-center justify-between">
    <button
    type="submit"
    className="bg-primary hover:bg-secondary text-white font-bold py-2 px-4 rounded focusutline-none focus:shadow-outline"
    >
    Send Message
    </button>
    </div>
    </form>
    {/* --- End of EspoCRM Form Embed Section --- */}
    </div>

    Thank you for your help!
    Attached Files
Working...