Documentation about all Form Logic features.
Handles all the logic for managing a multi step form that is implemented using the native Tabs component from Webflow.
<script> | |
document.head.insertAdjacentHTML( | |
'beforeend', | |
`<meta name="citation_author" content="REPLACE_THIS_WITH_AUTHOR_NAME">` | |
); | |
</script> |
// Leer los consents existentes actualmente: | |
let currentConsents = window.FsCC.store.getConsents(); | |
//Los consents están en el siguiente formato: | |
/* | |
currentConsents = { | |
analytics: false, | |
essential: true, | |
marketing: false, | |
personalization: false, |
/** | |
* Interacting with list items in `cmsload`. | |
*/ | |
window.fsAttributes = window.fsAttributes || []; | |
window.fsAttributes.push([ | |
'cmsload', | |
(listInstances) => { | |
console.log('cmsload Successfully loaded!'); | |
// `listInstances` holds an array with all the CMS Lists using `cmsload` on the page. |
/** | |
* Listening for `renderitems` events on a `cmsfilter` setup. | |
*/ | |
window.fsAttributes = window.fsAttributes || []; | |
window.fsAttributes.push([ | |
'cmsfilter', | |
(filterInstances) => { | |
console.log('cmsfilter Successfully loaded!'); | |
console.log(filterInstances); |
/** | |
* Init | |
*/ | |
document.addEventListener('DOMContentLoaded', () => loadMore({ collectionSelector: '#blog-posts' })); | |
/** | |
* Loads all the paginated items from a collection. | |
* @param params.collectionSelector The selector of the collection. | |
* @param params.targetSelector The selector of the target where all items will be appended. | |
*/ |
/** | |
* Display the last published date of a Webflow site in an HTMLElement | |
* @constant targetSelector You should place the selector of the element that will display the publish date. | |
* If you want to modify the outputted Date format, you can pass an additional options object to the Date.toDateString() method. | |
*/ | |
document.addEventListener('DOMContentLoaded', () => { | |
const targetSelector = 'YOUR_ELEMENT_SELECTOR_HERE'; | |
const publishDate = extractPublishDate(); | |
if (!publishDate) return; |
document.addEventListener('DOMContentLoaded', async () => { | |
initNesting({ | |
mainCollectionSelector: '#blog-posts', | |
nestedCollectionsSelectors: ['#categories', '#authors', '#tags'], | |
}); | |
}); | |
/** | |
* Init the nesting | |
* @param mainCollectionSelector The selector of the collection where the children will be nested |
/** | |
* Restart Webflow JS library | |
*/ | |
const restartWebflow = () => { | |
window.Webflow.destroy(); | |
window.Webflow.ready(); | |
window.Webflow.require('ix2')?.init(); | |
}; |