Track tagged form block field block ids for later use in other code.
-
7.1
-
7.0
-
Squarespace plan that supports JavaScript.
- Yes
-
Add the following to Website > Pages > Website Tools > Code Injection > HEADER.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
-
Page Specific
- Add code from file form block track field block ids.html to Page Settings > Advanced > Page Header Code Injection for the page. Please see per-page code injection.
-
Site-wide
- Add code from file form block track field block ids.html to Website > Pages > Website Tools > Code Injection > FOOTER.
-
Read the code for any instructions within.
-
Add or edit a form block. For the first field add a line field with a label of twc-fbtfbi.
-
For each field you want to track add twc-fbtfbi to the field description. What gets tracked? The field block ids are added to an attribute data-twc-fbtfbi on the form wrapper element. You can then use the data later for whatever purpose you can imagine.
This code is a base for other effects. On its own it doesn't produce visible results. This effect is not active in SS Preview to test it use private browsing.
Please consider making a donation.
-
2023-05-07
- add some missing guard checks
- bumped version to 0.1.2
-
2023-05-07
- fix for cooperative elements hide/show code not working
- bumped version to 0.1.1
-
2023-05-07
- initial version