open-index/open-npm huggingface dataset:
npm package: @fathomed/webflow-employer-search
Description: Webflow employer search functionality
Author: Fathom Studio
Latest version: 1.0.4

# 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`:

```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:

```html
<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

```bash
# Install dependencies
npm install

# Run locally
wrangler dev

# Deploy
wrangler deploy
```

## Functionality

- 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 **