@fathomed/webflow-employer-search
v1.0.4
Published
Webflow employer search functionality
Readme
Webflow Employer Search Cloudflare Worker
Prerequisites
- Cloudflare Worker account
- Webflow API v2 access token
- Webflow Site ID
- Webflow Collection ID for employers
Setup
Environment Variables
Set the following environment variables in your wrangler.toml:
[vars]
WEBFLOW_ACCESS_TOKEN = "your-token-here"
EMPLOYERS_COLLECTION_ID = "your-collection-id-here"HTML Setup
Add this HTML structure to your Webflow page:
<form id="employer-search-form">
<input type="text" id="search" placeholder="Enter Employer ID" />
<button type="submit" id="employer-search-button">Search</button>
<div id="error-message"></div>
</form>
<input type="text" id="employer-name" />Development
# Install dependencies
npm install
# Run locally
wrangler dev
# Deploy
wrangler deployFunctionality
- Searches Webflow CMS Collection by Employer ID
- Retrieves employer name associated with the ID
- Populates #employer-name text field with the result
- Displays error messages when needed
Error Handling
The system handles several error cases:
- Invalid employer IDs
- API errors
- Network issues
Security
- CORS is properly configured
- API keys are stored securely in Cloudflare
- Input validation is performed on both ends
Notes
- Uses Webflow API v2
- Runs on Cloudflare Workers for serverless operation
- Designed for seamless integration with Webflow forms
**Testing update to NPMJS **
