fijisunshine
Forum Replies Created
-
Thank you very much @bcworkz.
I was mistaken. Yes, your solution works great for both .value and .innerHTML
Marking as resolved.
Thank you @bcworkz. Ok my apologies, I had simplified my question to only div’s. But I also have form fields that use .value in the javascript.
<script>var my_form_field = document.getElementById(“my_form_field”);
if(my_form_field != null){my_form_field.value = “Contents of form field”;}</script>Generates “Uncaught TypeError: Cannot set property ‘value’ of null” in the console when using your suggestion. i.e. your suggestion works on divs with .innerHTML but not on form fields with .value
Can you suggest a solution for form fields with .value? Thanks again
Thank you for your reply @bcworkz. Smart idea.
However, I’m still getting the console error when using your suggestion on .value
Your suggestion did seem to work for .innerHTML but not .value
Any suggestions? Thanks again
Forum: Plugins
In reply to: [Post My CF7 Form] Issue when updating from version 4.1.9Ok, thank you Aurovrata.
Update:
When running the sql query, $wpdb is putting single quotes around the content of each %s. For example, “%s%” is being run as ‘%s’% in the query. But it should be run as ‘%s%’. This is the issue.
Based on @eltobiano’s helpful suggestion, I added .’%’ to the appropriate string in the array called $prepare. Therefore, the % is now included within the %s and the query runs correctly.
So my issue is “resolved”. But I think it’s a dangerous issue for others because many sql queries that appear to be correctly written, and previously worked properly, will now only return 0.
I’m not sure if this is due to PHP 8.0 or recent updates to the WordPress core.
Thanks again
Hi @eltobiano,
Thank you for your response. For simplicity purposes, I had simplified my queries for you but $prepare is actually an array with multiple strings, i.e. my query actually has AND statements and multiple %s.
Would it be possible to use your suggestion given than $prepare is an array? If not, any other suggestions?
Thanks again
Thanks again for your response. Just to confirm: In your newest code above, did you mean to use “_wpcf7cf_visible_groups” in all 3 lines? In your 2nd newest code above, you didn’t do that.
Can you confirm if “_wpcf7cf_visible_groups” should be in all 3 lines? Thanks again
Excellent, thank you very much for fixing the issue. With your newest code, the conflict in php 8.0 appears to be gone. CF7 forms are showing messages again.
Yes, I understand that this temporary fix will be overridden when I update the Conditional Fields plugin. Thanks for the reminder.
Ok, thank you for confirming.
I think the plugins are still conflicting in php 8. My contact form won’t show any messages, i.e. validation errors, submission confirmation, etc.
No errors in the log. In the browser console, I get this error when trying to submit any CF7 form:
“Failed to load resource: the server responded with a status of 500 ()
…/contact-form-7/v1/contact-forms/123456/feedback:1”
This console error disappears in php 7.4. It also disappears if I disable either plugin when using php 8.
Any suggestions? Thanks again
Thank you for your excellent response.
Just to be sure, did you intend to use “_wpcf7cf_visible_groups” in all 3 lines of code? That doesn’t seem right to me. Can you confirm that it is?
Thanks again
Forum: Fixing WordPress
In reply to: Issue with space added near shortcodes in WordPress 5.7Thank you, Joy. I followed your instructions. The following code is in the html source code (i.e. visible when inspecting with the browser) wherever there’s a shortcode in the classic editor:
<p>
::before
</p>I think these empty paragraphs are causing the spaces on the website. The css looks ok.
Any thoughts? Thanks again
Forum: Plugins
In reply to: [Conditional Fields for Contact Form 7] Submit button is unresponsiveHi Jules,
Ok, thanks for letting me know about the PRO version.
FYI I reverted back to PHP 7.4 from PHP 8.0 and the issue disappeared. With PHP 7.4, there’s no conflict between the plugins.
Forum: Plugins
In reply to: [Conditional Fields for Contact Form 7] Submit button is unresponsiveThank you, Jules.
You’re right, it’s a conflict with the “Contact Form 7 Multi-Step Forms” plugin. If this plugin, or that plugin, is disabled then the issue is gone.
I tried rolling back this plugin several version to see if that would fix it. It didn’t. I then tried rolling back that plugin several versions. But that didn’t fix it, either.
Forum: Plugins
In reply to: [Conditional Fields for Contact Form 7] Submit button is unresponsiveHi Jules,
Thank you for your reply. Yes, the error also exists on very simple forms. I created a form with just one field and a submit button:
[text name]
[submit “Submit”]
and the error exists. Please note the “PHP Fatal error” in my prior message (above). Also, please note I’m using CF7 5.3.2.
If you have any more questions, please let me know.
Thanks again