contact-form-7

How to programmatically change the default messages in Contact Form 7?

ぃ、小莉子 提交于 2020-07-08 03:49:51
问题 I am trying to edit the error message for spam in the contact-form-7 plugin in WordPress. As of now it only shows a simple message with 'there was an error trying to send your message', I would like to change this. But I can not figure out where to find the place in the code where this message is sent from. I have found the default message, but once this is changed, this does not do anything. Where can I find this? 回答1: There are 2 ways to change the default messages in CF7, one is using the

How to add a custom attribute?

旧时模样 提交于 2020-07-04 08:47:32
问题 How to add a custom attribute in the field Contact Form 7 without javascript ? For example, there is such a field on the page: <input type="text" name="name" class="form-control" id="name-1" data-attr="custom" data-msg="Текст 1"> Question: is it possible to set these custom attributes ( data-attr , data-msg ) of fields in the admin panel? 回答1: Find the name of your field. [text* text-21] If the name of your field name="text-21", like in my example, add this code to functions.php file. add

How to add a custom attribute?

烈酒焚心 提交于 2020-07-04 08:46:40
问题 How to add a custom attribute in the field Contact Form 7 without javascript ? For example, there is such a field on the page: <input type="text" name="name" class="form-control" id="name-1" data-attr="custom" data-msg="Текст 1"> Question: is it possible to set these custom attributes ( data-attr , data-msg ) of fields in the admin panel? 回答1: Find the name of your field. [text* text-21] If the name of your field name="text-21", like in my example, add this code to functions.php file. add

How to use Wordpress wp_remote_post if I don't need to get a response?

假如想象 提交于 2020-06-17 02:02:02
问题 Using wp_remote_post to send form data ( Contact Form 7 ) to external API (CRM). API is heavy (checking emails, confirmation letters, etc), so I don't want PHP to block any processes, while waiting for a response (I don't need response at all, just send). Still, even with 'blocking' => false it does — if I activate confirmation emails on external API, Wordpress users need to wait several seconds before form is processed. What am I doing wrong? :) Code: // POST-request to API wp_remote_post(

How to use Wordpress wp_remote_post if I don't need to get a response?

邮差的信 提交于 2020-06-17 02:01:11
问题 Using wp_remote_post to send form data ( Contact Form 7 ) to external API (CRM). API is heavy (checking emails, confirmation letters, etc), so I don't want PHP to block any processes, while waiting for a response (I don't need response at all, just send). Still, even with 'blocking' => false it does — if I activate confirmation emails on external API, Wordpress users need to wait several seconds before form is processed. What am I doing wrong? :) Code: // POST-request to API wp_remote_post(

Dynamically Disable Contact Form 7 Field Validation

夙愿已清 提交于 2020-04-10 09:40:58
问题 In my contact form 7 I have two radio buttons that show and hide fields in the contact form depending on the selection made by the user. When you click on the "phone" radio button, a script (JS not jQuery) makes sure that the email field is hidden and only the phone field is displayed. When you click on the email radio button, the email field shows up and the phone field is hidden. That part is working exactly as I'd like it to work. The problem I'm having is that I can't figure out how to

Dynamically Disable Contact Form 7 Field Validation

走远了吗. 提交于 2020-04-10 09:40:18
问题 In my contact form 7 I have two radio buttons that show and hide fields in the contact form depending on the selection made by the user. When you click on the "phone" radio button, a script (JS not jQuery) makes sure that the email field is hidden and only the phone field is displayed. When you click on the email radio button, the email field shows up and the phone field is hidden. That part is working exactly as I'd like it to work. The problem I'm having is that I can't figure out how to

Contact Form 7 cause HTTP 500 error

╄→尐↘猪︶ㄣ 提交于 2020-02-01 04:09:05
问题 No one is able to submit forms, I took a look at it and I’m getting a POST 500 Internal Server Error. POST http://carlsbad4rent.com/wp-json/contact-form-7/v1/contact-forms/321/feedback 500 (Internal Server Error) Note: The same code is working well in localhost[wamp] 回答1: You need change in .htaccess file and in local setup folder name set as "wordpress" but in live site we have to change this name. Before # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /agilitycards/

Calculation based on number of checkboxes checked in Contact-Form-7 based on JQuery

自闭症网瘾萝莉.ら 提交于 2020-01-16 17:35:27
问题 I am building a form where users should type in numbers and select options in checkboxes. At the end I want to make calculations out of the inputs and display them to the user. I found a tutorial pointing me in the right direction here. With that I was able to do a simple calculation based on an input value of a user. Now I want to do a more complex calculation based on the number of checkboxes that are checked. In my code I have the fields "number", "group1", "group2". The results should be

Calculation based on number of checkboxes checked in Contact-Form-7 based on JQuery

冷暖自知 提交于 2020-01-16 17:34:12
问题 I am building a form where users should type in numbers and select options in checkboxes. At the end I want to make calculations out of the inputs and display them to the user. I found a tutorial pointing me in the right direction here. With that I was able to do a simple calculation based on an input value of a user. Now I want to do a more complex calculation based on the number of checkboxes that are checked. In my code I have the fields "number", "group1", "group2". The results should be