contact-form

Custom validation is not working in Contact Form 7 in ver 4.1.1

爷,独闯天下 提交于 2019-12-12 09:44:12
问题 I have to make a form with custom validation field in contact form 7. It is not working with latest version (4.1.1) of Contact Form 7 but working in older version. I have created a field for getting coupon code from the form. I want to validate the entry if the coupon is started from "HIP". My code is given below: add_filter( 'wpcf7_validate_text', 'your_validation_filter_func', 999, 2 ); add_filter( 'wpcf7_validate_text*', 'your_validation_filter_func', 999, 2 ); function your_validation

Wordpress and Google Analytics Events

拥有回忆 提交于 2019-12-12 05:49:12
问题 I want to track some actions in Google Analytics but I can't get it working. I tried it with Contact Forms (Wordpress). At the additional settings I just wrote: on_sent_ok: "ga('send', 'event', 'Formular-Beratung', 'sent');" but it does not work. I installed the Google tag assistant, but I cant see any event (not even in the live view at Google Analytics). Next: There is a live chat (snapengage). Here you can also track events. For this I implemented the code var seAgent; SnapABug.setCallback

Securing a php contact form

冷暖自知 提交于 2019-12-12 05:06:35
问题 i have made a simple php contact form following this tutorial: http://www.catswhocode.com/blog/how-to-create-a-built-in-contact-form-for-your-wordpress-theme The big problem is that this form processing is not safe, I have heard people can use it to send spam and/or hack my server. What are the basic steps needed to make this form more secure? Ps: I don't want to use re-captcha if it can be avoided... Edit: I need suggestions to what php functions are used to filter and secure that the form

Bootstrap Contact Form server not responding

我与影子孤独终老i 提交于 2019-12-12 04:34:17
问题 I am trying to get my contact form to work, but when I fill out the form, it throws out a server not responding error. You can view the JSFiddle here: JS & HTML contact form code The contact_me.php code: <?php error_reporting(E_ALL); ini_set('display_errors', 1); // check if fields passed are empty if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['phone']) || empty($_POST['message']) || !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL)) { echo "No arguments Provided!";

Contact form with reCaptcha [closed]

我们两清 提交于 2019-12-12 04:16:17
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I know this may have been submitted before (sorry) I have basic form, these are the details id like to be sent, however i cannot get the reCaptcha to work with it. I have googled all day, but when i try other peoples code (amending to fit mine) it doesnt seem to work. I would like: Name, Email, Number,

PHP contact form sending email every time the page is refreshed

不问归期 提交于 2019-12-12 03:57:51
问题 PHP contact form sends email every time the page is refreshed. If user sends his message once and refreshes again, the same message is sent again. This happens every time the page is refreshed. Here is my code form the form: if (isset($_POST['submit'])) { if ($_POST['email'] == '' || $_FILES['file_upload'] == '' || $_POST["fname"] == '' || $_POST["lname"] == '' || $_POST["message"] == '') { echo '<p class="red-info">Please Fill All The Fields</p>'; } else { $from_email = $_POST['email']; /

PHP contact form submitting but not receiving email

谁都会走 提交于 2019-12-12 03:52:21
问题 I realise this question has been asked numerous times before but everyone's code is obviously different and I am quite new to php so just looking to see if someone can give me some help. I have created a basic contact form for a site but for some reason the information is not being sent to my email address although I believe that the form is submitted? my PHP code is: <?php session_start(); //$to_mail = "architects@palavin.com,t.lavin@palavin.com,12yorkcourt@gmail.com"; $to_mail = "danny

PHP form: Cannot modify header information - headers already sent [duplicate]

隐身守侯 提交于 2019-12-12 02:34:39
问题 This question already has answers here : How to fix “Headers already sent” error in PHP (11 answers) Closed 6 years ago . I know that this question has been asked many times, however, I can't seem to find solutions that are relevant to my situation, since they mostly deal with wordpress. Here is my mail form: <?php $to = "email@gmail.com" ; $from = $_REQUEST['email'] ; $name = $_REQUEST['name'] ; $headers = "From: $from"; $subject = "Contact Submission From domain.com"; $fields = array();

Add BCC field to a php contact form

大城市里の小女人 提交于 2019-12-12 02:29:14
问题 the code below is used on my site to send e-mails via a contact form. I'd like to add an additional e-mail address on BCC but can't figure out how to to this so your help would be welcome. Many thanks <?php // Email Submit // Note: filter_var() requires PHP >= 5.2.0 if ( isset($_POST['email']) && isset($_POST['name']) && isset($_POST['message']) && filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) ) { // detect & prevent header injections $test = "/(content-type|bcc:|cc:|to:)/i"; foreach ( $

How can I grab or access different model attribute when I send email using Sendgrid Rails Heroku

半世苍凉 提交于 2019-12-12 02:13:30
问题 I am using devise, and scaffolded Textbook. I like to implement my strategy. When buyer clicks an @textbook.title -> Buyer can send an email to the @textbook's seller. I have every model has column for 'user_email' So, Whenever a seller create a @textbook, automatically current_user.email is saved into @textbook.user_email. I just don't know how to grab the seller's user_email and send email. I have following Textbook model: class Textbook < ActiveRecord::Base belongs_to :user validates