Open buzztone opened 5 years ago
Theoretically, It can be done simply by calling the scripts on short-code rendering (#9346), but the cf7 authors are actually, very hard to reach!
I have regular contact with the CF7 plugin author, Takayuki Miyoshi. I've found him very approachable.
I’ve found Takayuki is open to detailed, well researched & tested code submissions, that meet what he sees as the needs of the majority of CF7 users.
Where can I report bugs?
In cases when all scripts are being concatenated it is better to have all required scripts to be enqueued on all pages since then only one "bundle" script is generated and retrieved from cached on all subsequent requests.
It would be useful to have a toggle for this in the Controls plugin, though!
On the new update of cf7, using reCAPTCHA v3, the badge will show on every single page of the site. Concatenated scripts is not optimal for specific functionality of a single form.
Where can I report bugs?
Use form at https://contactform7.com/contact/. Be nice & you'll usually get a nice response.
It would be useful to have a toggle for this in the Controls plugin, though!
Definitely sounds like there should be an option. There are clearly cases where either option will be a better choice.
@kasparsd see https://github.com/rocklobster-in/contact-form-7/issues/1278#issuecomment-1716916776. Takayuki is planning to add an action hook in the shortcode callback function or somewhere else to make it easy for add-on plugins to implement the same script loading control. Takayuki is doing this to allow other plugins to add this option.
This scripts.js optimization question in the CF7 Forum raises an interesting idea.
It may not be technically feasible, but adding manually a list of pages with CF7 forms would probably not be burdensome for most CF7 users.