Quantcast
Channel: contact form 7 – WordPress.org Forums
Viewing all 9540 articles
Browse latest View live

unit_tag missing postID

$
0
0

Hi,

I build a small function to dynamically change the subject or the recipient, which used to work, but suddenly it doesn’t.
I tested everything and what I found is the unit_tag I use to get the postID didn’t contain the postID. It now lokks like this wpcf7-f13028-o1.

My code:

function customFormRecipient($contactForm){
    $submission = WPCF7_Submission::get_instance();  
  
    if($submission)  {  
        $unit_tag = $submission->get_meta( 'unit_tag' );  
        $explode_unit_tag = explode("-", $unit_tag);  
  
		// We're on the viewing request form  
		$postID = str_replace("p", "", $explode_unit_tag[2]);  

		//... We now have the postID. Go forth and conquer  
		
		$altSubject = get_post_meta($postID, 'alt_subject_form_box', true);
		
		$altRecipient = get_post_meta($postID, 'alt_recipient_form_box', true);

		// Get the submited form email data.
		$mailData = $contactForm->prop('mail');
		
		if ($postID){
		    if ($altSubject){
			  // Set the subject
			  $mailData['subject'] =  $altSubject;
			} 
			if ($altRecipient){
			  // Set the recipient
			  $mailData['recipient'] =  $altRecipient;
			} 
			
		} 			
		// Update/set the form properties.
		$contactForm->set_properties(['mail' => $mailData]);
	}  
}

add_action('wpcf7_before_send_mail', 'customFormRecipient');

Can anybody tell me what’s wrong and what I could change to retrieve the postID?

Thanks.


Huge spaces to left & right of acceptance checkbox?

$
0
0

I can’t figure out how to get rid of the huge spaces on either side of the acceptance checkbox. It looks really terrible, but I feel with the new privacy stuff going into effect this month that I really should have it on there.

Additional Headers invalid mailbox syntax

$
0
0

When I add Reply-to: [your-email] to Additional Headers field I get an error message. Despite this saved form with error works good. I mean recipient gets an email with correctly filled Reply-to address. Another forms created before work good without any errors.
I tried different ways to resolve the problem. When I leave just [your-email] the error message disappears. When I input Reply-to: or Reply-to: [email* your-email] (as it was recommended in CF7 site) the message returns back.
Could this be a bug in the parser?

Signature field not recognised – have to submit form twice

$
0
0

Hi All,

A fantastic add-on plugin for Contact Form 7 to say the least. However, I have a problem I wonder if someone could help me resolve:

When the user signs the signature field in the contact form and clicks submit, the signature is not recognised and the you get the message stating “The field is required”. You have to click submit again and then the form gets submitted successfully.

How can I overcome this so that the user does not have the submit the form twice?

Many thanks in advance.

Contact Form 7 Message Body Anchor Link Not Working

$
0
0

Hi,

In message body, Im trying to place reset password link along with the email content like,

<p> Click here to reset password <br>
https://www.redirecturl.com
</p>

After im getting email, the link is broken. It redirect to https://default.domain-name.s/232356532hjh4j34j3453443dfsdfds. link this.

Also i have enabled use HTML content type. but not working

Please help to resolve this issue

form content not in email, only browser view

$
0
0

I have one form that is sending notification emails only containing the following sentence:

*person’s name* from *city name* submitted an application for the position of:
*url of job listing*

https://imgur.com/a/wBcFARI

there are of course a lot of fields that are not included in this email. However there is a warning statement at the top (see link above) that says, “If there are problems with how this message is displayed, click here to view it in a web browser.”

If you click that link, you are able to see ALL the submitted fields properly…. What am I missing so that that data is actually in the email?

Thanks in advance for your time and effort.

Great plugin

$
0
0

its help me auto fill address Contact Form 7 though google auto address complete

Attaching an file saved as user metadata (custom field)

$
0
0

Hey everyone,

I tried finding a way to ‘pre populate’ a contact form 7 file field with a file stored in the user metadata. This file field is custom created with ACF (Advanced Custom Field).

I know that if I want to pre populate a field with just text I could use:


Here test_text is the name of the custom (text) field created with ACF.

However, when I try the following it doesn’t work:

[file my_file default:user_test_file]
Here test_file is the name of the custom (file) field created with ACF.

Any help would be greatly appreciated!

Thanks!


Input text is same color as background

$
0
0

Hey Guys,

I’m sure this is a really easy question for you but I can’t figure it out.

In my footer, I have a contact form and when I type in it I can’t see anything. It’s there because I can see it if I highlight but it’s typing the same color as the background I’m guessing. Could you please help me?

Problem site: https://momentum3growth.com/

Can’t add line breaks to acceptance condition

$
0
0

I would like to use an acceptance checkbox for a condition that is multiple paragraphs long, but cannot figure out how to keep the spacing between paragraphs. I’ve tried using br, p, and div tags, but they either don’t do anything, or seem to break from the acceptance condition.

Thanks in advance.

URGENT NEED HELP – Contact form 7 doesn’t work now

$
0
0

URGENT NEED HELP – Contact form 7 doesn’t work now…..

I just installed Wordfence Security, after i do the scan. Contact form 7 doesn’t work now, cannot receive others email from the form
What this pluging has done for me.
Very frustrated now!! Hope someone can help.

Even i delete the Wordfence Security plugin , the Contact form 7 still doesn’t help

WordPress plugins (contact-form-7, recaptcha.php)

$
0
0

[@ reference removed]

Please note that the link I have given is actually currently down as will be explained below!

So I was applying the new Galleria Metropolia theme in WordPress for a website that I am helping to manage, and then it recommended me to install and activate several plugins. One of them was the following, alongside various others such as: cmsmasters-mega-menu, cmsmasters-content-composer, etc.

But then after activating these plugins, I could no longer access either the wp-admin page or the page itself. And the error messages displayed were as follows:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 5120 bytes) in /home/oxfordlawsoc/public_html/wp-content/plugins/contact-form-7/modules/recaptcha.php on line 485

(NB: Various line numbers were displayed over the past hour, including 490, 476 and 346)

Hence I would appreciate if [@ reference removed] could kindly let me know what is going on here; I was hoping that the author of the PHP code would probably know what was going on here and be able to help with troubleshooting.
Plugin Name: Contact Form 7
Plugin URI: https://contactform7.com/

Galleria Metropolia Theme + Recommended Plugin contact-form-7

$
0
0

So I was applying the new Galleria Metropolia theme in WordPress for a website that I am helping to manage, and then it recommended me to install and activate several plugins. One of them was the contact-form-7, alongside various others such as: cmsmasters-mega-menu, cmsmasters-content-composer, etc.

But then after activating these plugins, I could no longer access either the wp-admin page or the page itself. And the error messages displayed were as follows:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 5120 bytes) in /home/oxfordlawsoc/public_html/wp-content/plugins/contact-form-7/modules/recaptcha.php on line 485

(NB: Various line numbers were displayed over the past hour, including 490, 476 and 346)

Hence I would appreciate if anyone on this support forum could kindly let me know what is going on here; I was hoping that the author of the PHP code would probably know what was going on here and be able to help with troubleshooting.

Conflict with Contact Form 7

$
0
0

Hi,

I noticed that the forms are stuck when submission buttons are clicked. It seems like Arigato Autoresponder is conflicting with Contact Form 7. Only when two plug-ins are activated, this happens.
What can I do to use two plug-ins at the same time?

regards,
Shigeki

Contact Form 7 not sending emails when embedded in PHP code

$
0
0

Hello all,

I hope someone can help. I have taken over a website and am trying to add Contact Form 7 to the homepage. However the homepage is hand coded (through appearance > editor) in PHP I believe and when I add the CF7 shortcode in, emails are not sent.

If I add it to any other page (through pages) it works.

I have noticed when I try and send from the homepage there is no notification of the message being sent. I am adding <?php echo do_shortcode( ‘[contact-form-7 id=”873″ title=”Newsletter Subscribe”]’ ); ?>.

Can anyone help? Thanks so much in advance.

Zak


No Data available despite showing Consent

$
0
0

I setup a Contact Form 7 form with no issues, it all worked great. When I first tried the Privacy Tools page to get access to data (visitor) it worked as expected, I could see the data, consent and was able to delete it.
However, I have since tested the form using the same email address I used the first time and its not working correctly. When I use Privacy Tools page I get an email saying there is no data, when I search for that email address in the ‘Data Subjects’ tab, it shows ‘No data found’ but does actually show ‘Consents given:’ ‘Contact Form Data Consent’ so something appears to not be quite correct.

I intend to do more tests to see if this is related to using the same email more than once, or a seemingly random bug.

I fully appreciate the enormous effort that you’ve made so far and I would sincerely like to thank your team.

UPDATE: Tried using a different email address and its not working at all now (even on first attempt), still no data stored, but consent given.
Further testing has revealed that it only currently works with registered users and does not work with Visitors.

GDPR: Do I have to store the consent?

$
0
0

Hello,
I want to make my contact form GDPR compliant.
If I use the [acceptance your-consent] tag, do I have to store the consent somewhere, or is it enough if the user can just not send without the consent?

Can’t get checkbox info to show within mailchimp lists

$
0
0

Hi – I have set up a new checkbox within my contact form 7 so that I can confirm if people want to be subscribed to my list, as well as signing up for the freebie (GDPR)
BUT…. when I go into the mailchimp list I can’t find anywhere that shows me whether they have signed up or not so can’t segment them. I also need to understand how to segment it at source so that it goes into a subscribed vs unsubscribed group?

Can anyone please help? Here’s my code..

</p>
<p>
<label>First Name</label>
<input name=”FNAME” type=”text”>
</p>

<p>
<label>Email address: </label>
<input type=”email” name=”EMAIL” placeholder=”Your email address” required />
</p>

<label>
<input type=”checkbox” name=”mc4wp-checkbox”

” unchecked=”true”> <span>Abby, I also want to hear from you with more recipes, inspiration and weight loss strategies. I understand that I can unsubscribe at any time.</span>

</label>

<p>
<p>
<input type=”submit” value=”Click to Join” />
</p>

Contact Form 7 Box/Border colors?

$
0
0

I understand if this is more of a Contact Form 7 support question. Was hoping to be able to make the form text box borders darker…they are really hard to spot with the current colors.

I found this CSS code, but I dont really like the way it makes the forms look after applying it. Know of anything off the top of your head?

Attaching Contact Form 7 to email

$
0
0

I am trying to attach the contact form 7 to the email that is sent so I am able to review clients answers. I have attempted to use the shortcode in the file attachments section under the mail tab but this has not worked.

Can you please provide the documentation or advise how I can do this? I have not been able to find what I am after on the support site.

Your help is much appreciated.

Viewing all 9540 articles
Browse latest View live