BF WP Forms

Features
- Wordpress Block Editor based form builder that integrates with the Brown-Forman APIs
- Age Gate
- Reuseable legal footer
Installation
Plugin can be downloaded from this URL and installed manually
Integration
Dealing With Classic Editor Sites
If the site is using the Classic Editor (or worse, a 3rd party page builder), I've found the best way to integrate the forms is via a shortcode. The Reusable Blocks Extended plugin allows us to create a reusable block containing a form, which can then be embedded into a page via shortcode.
Enable Age Gate Functionality
This is enabled via a constant that is set in wp-config.php. I wrote it this way so that sites that have a legacy age gate plugin already integrated won't end up with this feature getting accidentally activated.
Styles
By placing the following directory structure in the root of your theme the plugin will load extra.css if a plugin component is being rendered.
Block Templates
If absolutely necessary, you can override a form element block template. Copy the template from the plugin into the following directory structure in the root of your theme.
Warning
We do not recommend doing this. Doing everything via CSS is best.
Age Gate Hooks
The age gate template bf-wp-forms/templates/age-gate/age-gate.php
features several hooks that can allow you to inject HTML into it.
- bfwpf_age_gate_before
- bfwpf_age_gate_main_before
- bfwpf_age_gate_main_after
- bfwpf_age_gate_after
Example With Template
Example Without Template
Short Codes
There are a few shortcodes that allow some templates to be rendered in various places.
[bfwpf_legal_footer]
- Outputs the templated legal footer
[bfwpf_year]
- Simply renders the current year. This is used in the copyright field of the footer.
[bfwpf_list_sites]
- MULTISITE AGE GATE ONLY: Lists all sites as links to the root of every site
[bfwpf_list_other_sites]
- MULTISITE AGE GATE ONLY: Lists all sites other than the current as links to the root of every site