@ivcmedia/webflow-form-decorators
TypeScript icon, indicating that this package has built-in type declarations

0.5.0 • Public • Published

webflow-form-decorators

Decorate Webflow forms with dynamic fields (such as referral info and url submitted).

Usage

To use, simply include webflow-form-decorators.js in your website's head tag to expose the global webflowFormDecorators object with various utility methods.

Currently webflowFormDecorators exposes a single function, appendDynamicFieldsToAllForms, which appends a single url hidden field to all Webflow forms on the page which is populated with the current browser URL:

webflowFormDecorators.appendDynamicFieldsToAllForms();

appendDynamicFieldsToAllForms takes an optional ReferalTracker instance (see (@ivcmedia/referral-tracker)[https://www.npmjs.com/package/@ivcmedia/referral-tracker]). If provided, this function also appends hidden inputs for capturing referral information (in particular fields named "landing_page_url", "referrer", "utm_campaign", "utm_source", "utm_content", "utm_term", and "utm_medium"):

const referralTracker = new ReferralTracker();
webflowFormDecorators.appendDynamicFieldsToAllForms(referralTracker);

Readme

Keywords

none

Package Sidebar

Install

npm i @ivcmedia/webflow-form-decorators

Weekly Downloads

1

Version

0.5.0

License

UNLICENSED

Unpacked Size

9.83 kB

Total Files

8

Last publish

Collaborators

  • jordanddisch
  • yossoviedo
  • ivcmedia_builder
  • kendallshain
  • donkefant