Quantcast
Channel: cf7 – WordPress.org Forums
Viewing all 1811 articles
Browse latest View live

DOM events not working after update to v5.2.x

$
0
0

I always use Contact form 7 with my custom sweetalert which i have been able to update the code to work with the latest version. i.e instead of using the error classes in the validation message div which has been removed, I’m using the wpcf7-form class to trigger sweetalart (i.e init, sent and invalid class).

Now I use the DOM event to default the button text and since i updated the DOM events no longer works


$('.wpcf7').on('wpcf7:invalid wpcf7:spam wpcf7:mailsent wpcf7:mailfailed', function () {  
	  $('.wpcf7-submit').val(OriginalSubmitValue);
	});

Please what are the new event listeners. Thanks


CF7 Submission Failed

$
0
0

Hi Guys,

I need help and guidance with my website’s contact form. It’s a dead end where my a freelancer broke my contact form and now it cannot submit.

My GTM preview doesn’t detect an event / submission when I clicked send. and when I checked the error log, here’s what happened.

ERROR LOG
[22-Aug-2020 18:12:15 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function CF7CF::hide_hidden_mail_fields(), 1 passed in /home/htmmedic/public_html/wp-includes/class-wp-hook.php on line 287 and exactly 3 expected in /home/htmmedic/public_html/wp-content/plugins/cf7-conditional-fields/cf7cf.php:239
Stack trace:
#0 /home/htmmedic/public_html/wp-includes/class-wp-hook.php(287): CF7CF->hide_hidden_mail_fields(Object(WPCF7_ContactForm))
#1 /home/htmmedic/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
#2 /home/htmmedic/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#3 /home/htmmedic/public_html/wp-content/plugins/contact-form-7/includes/submission.php(250): do_action(‘wpcf7_before_se…’, Object(WPCF7_ContactForm))
#4 /home/htmmedic/public_html/wp-content/plugins/contact-form-7/includes/submission.php(158): WPCF7_Submission->mail()
#5 /home/htmmedic/public_html/wp-content/plugins/contact-form-7/includes/submission.php(28): WPCF7_Submission->submit()
#6 /home/htmmedic/public_ht in /home/htmmedic/public_html/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 239

I can’t pinpoint exactly where is the problem lies in. Appreciate help from the expert here. 🙂

Doesn’t work with CF7 Conditional Field

$
0
0

I’ve tried making it work along with using the Conditional Field plugin. But it doesn’t work.

CF7 submit form event not triggered

$
0
0

Hello, i have installed the CF7 integration addon.
I have created a new test user and logged in.
Then i have submitted the form but the event seems isn’t triggered by Gamipress.
This is the module:

<label> Inserisci il codice
[text* code] </label>

[group group-code]
<label> Codice valido!
[submit “Invia”] </label>
[/group]

The module have conditional fields, only for certain text values the Send (Invia) button is showed up (eg. input “TRLSX1WOW”).
With the test user logged in i have submitted the form but the user didn’t earned the expected points.

This is the point award i had set up: https://imgur.com/XVWJLE3

Error sending

$
0
0

Upgrading to 5.2.2: “There was an error sending…” Rolled back to 5.2.1 all is fine.

File attachment not working

$
0
0

Hello,

I have a form with 2 file uploads and the upload works fine. But when the message is sended, the files aren’t attached. I tried to search on google and on the support page, but I didn’t found the answer.

I use contact form 7 version 5.2.2.

Does any one knows why it didn’t work?

Using hook WPCF7_before_send_mail in my own plugin, but form is not resetting.

$
0
0

Hello. I hope someone is able to solve this issue with me. I have written a custom plugin that hooks CF7 using the wpcf7_before_send_mail hook, retrieves the form data, and then uses cURL to POST to our Salesforce “Web-to-Case” system.

The plugin does everything correctly except one thing. The form just “hangs” and does not reset the form after submission. I feel like my plugin is interrupting the AJAX code to reset the form, but I am lost on finding a solution.

Here is the URL: https://www.magicinkjet.com/products/dmibop/ (You need to click the “Request a Sample” button on the left of the page to open the form.)

Here is my plugin code (I’ve removed sensitive data in my code.):

add_action( 'wpcf7_before_send_mail', 'web_to_salesforce' );

function web_to_salesforce($cf7) {

  $submission = WPCF7_Submission :: get_instance() ;
  $wpcf = WPCF7_ContactForm :: get_current() ;

  if( $wpcf->id == 47 ){ // 47 being the id of the CF7 form

      if (!$submission) {
        return false;
      }
    
      //$mail = $wpcf->prop('mail');

      $posted_data = $submission->get_posted_data() ;

      // assign CF7 fields to PHP data variables
      $url = 'https://webto.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8';
      $fields = array(
          'debug'       => 1, // set to 1 to active debug mode
          'debugEmail'  => 'xxxxxx@xxxxxxxx.com',
          'orgid'         => '0xxxxxxxxxxxxxx',
          'recordType'  => $posted_data['Case-Record-Type-ID'],
          'subject' => $posted_data['subject'],
          '0xxxxxxxxxxxxxx' => $posted_data['brand'],
          '0xxxxxxxxxxxxxx' => $posted_data['referral-source'],
          'priority' => $posted_data['priority'],
          '0xxxxxxxxxxxxxx' => $posted_data['product-name'],
          '0xxxxxxxxxxxxxx' => $posted_data['company'],
          '0xxxxxxxxxxxxxx'  => $posted_data['first-name'],
          '0xxxxxxxxxxxxxx' => $posted_data['last-name'],
          '0xxxxxxxxxxxxxx' => $posted_data['title'],
          '0xxxxxxxxxxxxxx' => $posted_data['phone'],
          '0xxxxxxxxxxxxxx' => $posted_data['email'],
          'email' => $posted_data['email'],
          '0xxxxxxxxxxxxxx' => $posted_data['dealer'][0],
          '0xxxxxxxxxxxxxx' => $posted_data['Have-a-dealer'][0],
          '0xxxxxxxxxxxxxx' => $posted_data['address1'],
          '0xxxxxxxxxxxxxx' => $posted_data['address2'],
          '0xxxxxxxxxxxxxx' => $posted_data['city'],
          '0xxxxxxxxxxxxxx' => $posted_data['state'][0],
          '0xxxxxxxxxxxxxx' => $posted_data['zip'],
          '0xxxxxxxxxxxxxx' => $posted_data['Country'][0],
          '0xxxxxxxxxxxxxx' => $posted_data['Province'][0],
          'submit' => 'Submit'
      );

      curl_send_to_salesforce($url, $fields);

      

          return $cf7;
  }

}

function curl_send_to_salesforce($url, $fields){

  // URL-ify the data for the POST
  $fields_string = http_build_query($fields);

	// Open connection
	$ch = curl_init();

	// Set the url
	// Set the number of POST vars
	// Set the POST data
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Connection: keep-alive',
    'Cache-Control: max-age=0',
    'Upgrade-Insecure-Requests: 1',
    'Origin: https://www.magicinkjet.com',
    'Content-Type: application/x-www-form-urlencoded',
    'User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)',
    'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
    'Sec-Fetch-Site: cross-site',
    'Sec-Fetch-Mode: navigate',
    'Sec-Fetch-User: ?1',
    'Sec-Fetch-Dest: document',
    'Referer:https://www.magicinkjet.com',
    'Accept-Language: en-US,en;q=0.9'
  ));
  curl_setopt($ch, CURLOPT_FAILONERROR, true); // Required for HTTP error codes to be reported via our call to curl_error($ch)
  curl_setopt($ch, CURLOPT_HEADER, TRUE);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

  // Set data to be posted
  //curl_setopt($ch, CURLOPT_POST, count($fields));
  curl_setopt($ch, CURLOPT_POST, TRUE);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);

	// Execute post
  $result = curl_exec($ch);

 	// Close connection
  curl_close($ch);

  return $result;
}

Any assistance would be greatly appreciated! I’ve spent almost a week troubleshooting this issue and I haven’t found a solution.

Remove top padding / margin

$
0
0

I can’t find a solution to this. At the top of the form there is a 30px or even 40px space and can’t get rid of it. Tried to add custom CSS but nothing. Any suggestion?


Can’t override Theme Salient Nectar

$
0
0

I have attempted to override the theme for styling the form and I have succeed in most tasks except for the submit button. Any suggestions? Thanks.

Here’s a sample of the custom button CSS I have attempted to customize:

 .wpcf7 input[type="submit"] {
     color: #ffffff;
     font-size: 18px;
     font-weight: 700;
     background: #C0C0C0;
     padding: 15px 25px 15px 25px;
     border: none;
     border-radius: 5px;
     width: auto;
     text-transform: uppercase;
     letter-spacing: 5px;
 }

Testmail OK but Contact Form 7 fails sending message

$
0
0

Hi,

I have a problem with Contact Form 7 and (WP Mail) SMTP. I installed WP Mail SMTP, set up the SMTP settings and sent a test email, which was successful. But when I try to send a message with Contact Form 7 I now get an error (“Error sending your message, please try again..”). Before installing WP Mail SMTP it worked just fine. What do I have to do to make CF7 work with SMTP?

I tried to use different From email addresses in CF7 plugin form settings, on its Mail tab, but still no joy.

Any suggestions?

Thanks in advance.

Regards,

Kristian

Is there a way to send form submission?

$
0
0

When I submit a form using this plugin, it saves the data to the contact list well.

But I would like to record actual form submissions in hubspot in the list of forms: http://prntscr.com/ub06zh .

Is there a way to do that?

Perfect integration

$
0
0

Do you have Contact Form 7 on your WordPress website? Do you work with Pipedrive CRM? Than this is the plugin for the best seamless integration you need!

How to create link to pdf generate

$
0
0

Hi, I need to integrate into my theme link for pdf generate, is possible to know the code php for this of is the best if I can redirect to pdf after send cf7 form, can I do this?

And How I can disable send to email for pdf? (I have check no into Want to attach your own PDF in email? but send pdf for mail).

I want to reply email to customer

$
0
0

I want to reply the email to customer with the same data which he/she fill, at the time of submission, anyone help me ?

Custom function $posted_data not working after 5.2

$
0
0

Hi,

I have an issue since 5.2.1 update. 5.2.2 did not resolve my problem.
I have a custom function to change recipient according to customer country or region. I was checking $submission->get_posted_data() to compare with my database to find the right recipient email and change it before sending notification.
Since 5.2.1 update it doesn’t work anymore and I don’t know why because I don’t see anything related inside your changelog.
I had to roll back to 5.2.

My function is hooked to wpcf7_before_send_mail and here is a piece of my function so you can see what I’m using inside :

$current_mail_array = $contact_form->prop('mail');
$submission = WPCF7_Submission::get_instance();
$posted_data = $submission->get_posted_data();
if(array_key_exists($posted_data['my_form_field'], $emailpays)) {
    $current_mail_array['recipient'] = $emailpays[$posted_data['my_form_field']];
  }
$contact_form->set_properties(array('mail'=>$current_mail_array));

Do you know what my problem is and how can I solve it ?
I would like to keep CF7 up to date.

Thanks,
Have a nice day !


SendInBlue WP Plugin Lacks integration with Contact Form 7

$
0
0

It works for me. However, the SendInBlue (SiB) plugin only has a Google captcha option – no options to use quizzes, honeypots, and such like Contact Form 7 (CF7).

I don’t want to use Google captcha because (1) it slows down my site’s loading speed and (2) it has trackers, which is a concern to some visitors/customers who will refrain from using the form and/or their tracking blockers (uBlock Origin, for instance) will simply disable the form’s functionality (blocks google trackers).

Too bad SiB can’t easily integrate with CF7 via an API.

Sidenote: SiB also lacks complimentary integration with SuiteCRM, sadly, so I’m not sure whether I’ll continue using SiB beyond the testing phase.

Nowadays, integration with other recognized providers is a must. Using Zapier is just a work-around for lack of native integration and will get costly for active users.

I might look into OroCRM (instead of using SuiteCRM), since it integrates natively/complimentary with MailChimp…and I believe MailChimp can be integrated with CF7 via API and/or plugin.

Any suggestions are welcome.

Error sending

$
0
0

Upgrading to 5.2.2: “There was an error sending…” Rolled back to 5.2.1 all is fine.

URL Referrer

$
0
0

Hello!!

Is there a way to send the URL Referrer to the WebHook?

I can get it through the console using this command: document.referrer

Do I need any aditional plugin?

Recaptcha opens automatically on page load

$
0
0

Hi
Recently, the Recaptcha (with image picking) shows on page load of the websites front-page. This is a big problem for us. We have a Contact Form 7 form on the page, but the form only shows after clicking a button, and the Recaptcha should not automatically open, and block general browsing on the front page.

I have tried to adjust Recaptcha and Form settings, without any luck. If I deactivate the CF7 plugin, the Recaptcha problem is gone.

Anyone has the same issue?

We will have to change the form if there is no fix for this.

Conflict with CF7 – /wp-json/contact-form-7/v1/contact-forms/24951/feedback 502

$
0
0

Hi there,
We have issue with Contact Form 7 which causes 502 error in the console: https://domain.com/wp-json/contact-form-7/v1/contact-forms/24951/feedback. When I tried to deactive this AMP plugin, I can submit the CF7 form successfully.

Could you please guide me how to fix this?

Thanks,
Khanh

Viewing all 1811 articles
Browse latest View live