-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to load CF7 JS only on pages that contain CF7 contact form #28
Comments
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. |
Use form at https://contactform7.com/contact/. Be nice & you'll usually get a nice response. |
Definitely sounds like there should be an option. There are clearly cases where either option will be a better choice. |
@kasparsd see rocklobster-in/contact-form-7#1278 (comment). 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.
The text was updated successfully, but these errors were encountered: