### React Filepond Integration for File Uploads Source: https://github.com/surjithctly/web3forms-docs/blob/main/getting-started/pro-features/advanced-file-uploader.md Integrate Filepond in your React application for a rich file uploading experience. This example shows how to set up Filepond with custom logic for getting pre-signed URLs and uploading files. ```jsx import React, { useState } from 'react'; import { FilePond, registerPlugin } from 'react-filepond'; import 'filepond/dist/filepond.min.css'; // Register plugins if needed // registerPlugin(FilePondPluginImageExifOrientation, FilePondPluginImagePreview); function FileUploader() { const [files, setFiles] = useState([]); const getPresignedUrl = async (file) => { try { const response = await fetch(`https://api.web3forms.com/upload?file=${file.name}`); const data = await response.json(); return data; } catch (error) { console.error('Error generating pre-signed URL:', error); throw error; } }; return ( { try { const { url, key } = await getPresignedUrl(file); const response = await fetch(url, { method: 'PUT', body: file, headers: { 'Content-Type': file.type, }, }); if (response.ok) { load(key); } else { error('Upload failed'); } } catch (err) { error('Error uploading file'); } }, }} /> ); } export default FileUploader; ``` -------------------------------- ### Complete Form Example with Advanced Uploader Source: https://github.com/surjithctly/web3forms-docs/blob/main/getting-started/pro-features/advanced-file-uploader.md This example demonstrates a full HTML form integrating the advanced file uploader with multiple file selection and size limits. ```html
``` -------------------------------- ### Default Form Example (Email as Reply-To) Source: https://github.com/surjithctly/web3forms-docs/blob/main/getting-started/customizations/custom-reply-to.md This example demonstrates a default form where the 'email' input is automatically used as the reply-to address for submissions. ```html
``` -------------------------------- ### Install Web3Forms React Plugin Source: https://github.com/surjithctly/web3forms-docs/blob/main/how-to-guides/js-frameworks/react-plugin.md Install the necessary packages for using the Web3Forms React plugin and react-hook-form. Supports both npm and pnpm package managers. ```bash npm install @web3forms/react npm install react-hook-form # or pnpm add @web3forms/react pnpm add react-hook-form ``` -------------------------------- ### Install @hcaptcha/react-hcaptcha Package Source: https://github.com/surjithctly/web3forms-docs/blob/main/getting-started/customizations/spam-protection/hcaptcha.md Use this command to install the official hCaptcha React package, necessary for integrating hCaptcha into React or Next.js applications. ```bash npm install @hcaptcha/react-hcaptcha --save ``` -------------------------------- ### Custom Reply-To Form Example Source: https://github.com/surjithctly/web3forms-docs/blob/main/getting-started/customizations/custom-reply-to.md This example shows a form configured with a custom reply-to email address using a hidden 'replyto' input field. ```html
``` -------------------------------- ### Basic HTML Form Setup Source: https://github.com/surjithctly/web3forms-docs/blob/main/getting-started/installation.md Use this basic HTML form structure for simple submissions. Ensure you replace 'YOUR_ACCESS_KEY_HERE' with your actual Web3Forms access key. ```html
``` -------------------------------- ### Daily Digest Integration Source: https://github.com/surjithctly/web3forms-docs/blob/main/getting-started/integrations/soon/integromat.md An example of an integration that collects data daily, aggregates it, and sends a digest via email. ```text [Webhook] → [Data Store: Add] → [Scheduler: Daily 9AM] → [Data Store: Search] → [Aggregator] → [Email: Send Digest] ``` -------------------------------- ### Install hCaptcha React Component Source: https://github.com/surjithctly/web3forms-docs/blob/main/getting-started/customizations/spam-protection/hcaptcha.md Install the hCaptcha React component using pnpm. This is the first step to integrating hCaptcha into your React application. ```bash pnpm add @hcaptcha/react-hcaptcha ``` -------------------------------- ### Example Webhook Payload Structure Source: https://github.com/surjithctly/web3forms-docs/blob/main/getting-started/integrations/webhooks.md This is an example of the JSON payload structure sent via HTTP POST for a form submission. It includes all submitted form fields and metadata. ```json { "name": "John Doe", "email": "john@example.com", "phone": "+1234567890", "message": "Hello, I'm interested in your services...", "subject": "New Contact Form Submission", "from_name": "My Website", "submittedAt": "2025-12-22T10:30:00.000Z" } ``` -------------------------------- ### Basic React Contact Form with Web3Forms Source: https://github.com/surjithctly/web3forms-docs/blob/main/how-to-guides/js-frameworks/react-plugin.md A basic example demonstrating how to set up a contact form using the useWeb3Forms hook from @web3forms/react and react-hook-form. Ensure you replace 'YOUR_ACCESS_KEY_HERE' with your actual Web3Forms access key. ```jsx import { useState, useEffect } from "react"; // npm install react-hook-form @web3forms/react import { useForm } from "react-hook-form"; import useWeb3Forms from "@web3forms/react"; export default function Contact() { const {register, reset, handleSubmit} = useForm(); const [isSuccess, setIsSuccess] = useState(false); const [result, setResult] = useState(null); const accessKey = "YOUR_ACCESS_KEY_HERE"; const { submit: onSubmit } = useWeb3Forms({ access_key: accessKey, settings: { from_name: "Acme Inc", subject: "New Contact Message from your Website", // ... other settings }, onSuccess: (msg, data) => { setIsSuccess(true); setResult(msg); reset(); }, onError: (msg, data) => { setIsSuccess(false); setResult(msg); }, }); return (
{result}
); } ``` -------------------------------- ### Correct URL Format for Redirection Source: https://github.com/surjithctly/web3forms-docs/blob/main/getting-started/customizations/redirection.md Always use a full, absolute URL starting with `https://` for the `redirect` value. Relative URLs will not work. ```html ``` ```html ``` -------------------------------- ### Full HTML Form with hCaptcha Source: https://github.com/surjithctly/web3forms-docs/blob/main/getting-started/customizations/spam-protection/hcaptcha.md A complete example of an HTML form including the hCaptcha integration and the Web3Forms submission script. ```html
``` -------------------------------- ### Vanilla React Form with File Uploader Component Source: https://github.com/surjithctly/web3forms-docs/blob/main/getting-started/pro-features/advanced-file-uploader.md This example demonstrates how to use the FileUploader component within a standard React form. It includes a hidden access key input and a submit button. ```jsx import React from 'react'; import FileUploader from './FileUploader'; function App() { return (

File Upload Example

); } export default App; ``` -------------------------------- ### Apply Dark Theme to Advanced File Uploader Source: https://github.com/surjithctly/web3forms-docs/blob/main/getting-started/pro-features/advanced-file-uploader.md Customize the appearance of the advanced file uploader by overriding default FilePond CSS class names. This example shows how to apply a dark theme. ```html ``` -------------------------------- ### Vue 3 Contact Form with Fetch API Source: https://context7.com/surjithctly/web3forms-docs/llms.txt A composable contact form for Vue 3 using `