theblindhawk
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Contact form 7 DB] A question about ShortcodesI have been using wordpress for quite a while, and I believe that is not an option (maybe I am wrong) which I personally don’t like at all.
I create another table arranged vertically and use hooks and stuff so the data goes into that table as well when it enters the horizontal table.Forum: Plugins
In reply to: [Advanced Contact form 7 DB] empty Field name in import csvThe problem was a compatibility problem with “cf7 Multi Form” plugin.
I decided to create my own REST API code in the end.
I think this is an awesome plugin, but I personally think it would appreciate more code examples in the documentation.Forum: Plugins
In reply to: [Contact Form 7 Multi-Step Forms] suddenly stopped workingIt…it’s working…after an hour of trying to understand what it was…
I will post a second comment if I understand what it was…- This reply was modified 3 years, 9 months ago by theblindhawk.
It seems the problem was the basic authentication on the site.
The code is now running, thanks for the sample ??Thank you so much for the reply!
I tried out the code you sent me, but it is returning me “401 unauthorized”.
I tried deleting cookies and cache, and checked the plugin settings, but they all seem fine. Could it be a problem with some other wordpress settings?
Or could I have i misconfigured the plugin?The site I am working on is still not open to the public and cannot be accessed without some credentials. could that be the problem?
Thanks again for the sample code!
It…looks like it started working.
Not sure why, I will update as soon as I understand.
I still have little experience with wordpress so it is still confusing.It could also be that the problem is unrelated tot his plugin, if so please let me know.
Thanks in advancefunction action_wpcf7_mail_sent( $contact_form ) { $submission = WPCF7_Submission::get_instance(); }; add_action( 'wpcf7_mail_sent', 'action_wpcf7_mail_sent' );
the code stops here already. I did not make the forms, but as far as i know, there are 2 forms: one to input all the data and another to check the data and confirming if it’s correct.
when i put this piece of code in functions.php the website stops at the loading between the submission form and the confirmation form.function action_wpcf7_mail_sent( $contact_form ) { //if (!isset($cfdata->posted_data) && class_exists('WPCF7_Submission')) { $submission = WPCF7_Submission::get_instance(); echo "attempting"; if ( $submission ) { $form_data = $submission->get_posted_data(); echo $form_data["your-name"]; // now $form_data contains the form values, // so you can do, for example $form_data['email'], instead of $_POST['email'] }else{ echo "fail"; // we got nothing; something went wrong } //} return $contact_form; }; // add the action add_action( 'wpcf7_mail_sent', 'action_wpcf7_mail_sent' );
this is my code so far.
Hello,
I was wondering if you could send a sample code, because I am having problems making WPCF7_Submission::get_instance()->get_posted_data() run.
Also does the code need to be added in the functions.php file? Or is it somewhere else.