Manipulate data after Contact form 7 is submited - php

I have contact form 7, form in my Wordpress site.
I want when form is submitted (and mail has sent) to pass via post method, the data to onother PHP file. In my last PHP file I have code to send form's data to a CRM system.
I have searched over the internet for a solution. Some people say its easy some other not. But at the end there isn't any example on how to do that.
Also I did not found anything in CF7 documentation.
What I found is hook and actions.
The only logical solution I found is that in this link .
But I don't understand where to put the code and how to call it.

The best way is to create a custom Plugin. Then you can add the code listed in your link to your Plugin code.
A guide to Plugin development can be found here. A good Plugin template to get you started can be downloaded from here.

Related

Wordpress Help - Cant See What Include Code Is Doing

I am trying to help a friend who's original developer bailed on this site. The theme is Webicompanyz and I see its using the Contact Form 7 plugin. In one of the pages is the following code snippet:
[include_contact]
This is including a form, but i cant tell where from. All the form includes from the Contact Form 7 plugin are different and I dont see this form listed anywhere. How can I tell where this code snippet is pulling from?
What you are seeing on this page is called a 'short code'. When WordPress reached one of these blocks it knows to fetch the missing content.
Short codes are widely used in plugins and widgets as an easy way to create dynamic content.
For your particular case
I would suggest viewing documentation for Contact Form 7

Joomla 3 registration form

On one of the sites i need to do some changes on for a client i am having trouble finding something.
On the standard Joomla 3 registration system a custom field was added to the form, but that form does not email to the admin when someone registers, please can someone point me in the correct direction on where i can make that field be sent in the email.
I have looks on quite a few pages on the net but have not come right with any of the answers that i found. I have also tried going to most of the php files to see if i cant find something but i am not having much luck.
Unfortunately that email is hard coded; it is really a legacy from Joomla 1.0. What you would probably want to do is turn off the core notification system and instead use a plugin that would be triggered with the onUserAfterSave event and use similar code to what is in the core. You will find that in the activate($token) method in the frontend registration model for com_users.
The plugins/user/joomla plugin gives an example of how to build an email, bit in your case you would want to build it when the user is created in the site application (isSite() == true). You can also look at the contactcreator plugin in the same folder; it also uses the onUserAfterSave event.

Upload file page in Wordpress and reponse there

I'm a beginner in PHP but an expert in programming in general, so I program C and C++ usually, but I have no experience with posting and getting with PHP, so I don't really understand the exact mechanism how this works.
Yesterday I worked for like two hours on my webserver and set a page on my Wordpress to make visitors upload a file. The page submits a form to a custom PHP page, but that page is empty and dull, and I would like to make the confirmation page in Wordpress itself. What I tried to do for that is that I created a new page, and used the plugin "insert PHP", and simply pasted the code from the page, to which the form submits, and made my upload form post to that Wordpress page. This doesn't seem to work.
How can I get this to work?
Simplifying the question: How can I make my form in wordpress post to another wordpress page and give the response in a wordpress page rather than a PHP page created from scratch?
If my question is not clear or requires any additional information to be answered, please let me know.
Thank you.
You're going to want to get to know specialized page templates in WordPress, and the page templating system in general. Ideally, you'd create a page in wp-admin and create a specialized page template for it.
If you're doing form processing, you can do that in the new template...but may be better off moving that logic to the functions.php file. Use action hooks to ensure that your processing functions are run on submit.

Add file attachment to default Joomla 2.5 contact form

I have a website that is using the default Contact form along with other data from the Contacts component and I need to add a file upload function to it.
I know there are many form components out there, I have used many of them but this site is using the default contact form from the Contacts component and also some other contact data here and there. So I don't want to have to build a whole new Contact page and form just to add file uploading. The file I want to update is templates/TEMPLATENAME/html/com_contact/contact/default_form.php
I am not a programmer unfortunately and even though I found a possible solution here: http://www.rupostel.com/joomla/hacks/how-to-add-uploads-to-your-joomla-contact-form, I was not able to follow it completely. I downloaded and activated the plug-in but nothing showed up.
Can anyone assist?
Thanks in advance.
Paul

How to take my PHP form handler pages into WordPress to connect with PayPal API

I'm trying to integrate a form like this into Wordpress
This form works perfectly with the PayPal API sandbox. However, when I tried to move this work over to the WP site of my organization, globalcitizenyear.org/donate/donation-form-2/, I keep coming up short.
Anyone have any tips to keep in mind when doing this? What steps would you take first to make this happen in Wordpress - any details on what to avoid, or what potential hangups might be?
Make a page called page-donation-form-2.php and load this code into it. You can leave in the get_header() and get_footer() tags if you want to have the site wrapper around the outside.
Make sure to change your form action also. And remember, that since this is in WordPress now, you will need to avoid some reserved form elements. Full list here.
If you have any trouble, please post your code here.

Categories