Send & Receive Data via Attributes.

This is a snippet from the my own library that i maintain for my webflow projects. A brief guide is found below;

Targeting Form Fields

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Targeting Text Elements

How To

Simply copy and paste the custom code found on the body of this page into your project.

Following that you need to assign 2 data attributes to each button sending data and a matching ID to the element receiving the data.

Attribute One
does-send-to

The value should match the element ID on the receiver element. For example 'input-one'

Attribute Two
does-send-data

The value should be the data you want to send, for example 'hello world'

Element ID

The unique ID for the receiving element, this is usually an input field.