Thread Starter
luxman
(@luxman)
It looks like the plugin has to work off of the contact 7 “action” code? cause that’s the part I’m changing and it doesn’t store the data.
If you mean you want to capture data from a form that is not CF7 or other that this plugin integrates with, see this post.
Thread Starter
luxman
(@luxman)
I’m adding [cfdb-save-form-post]
but nothing is getting saved… Is this the correct shortcode? do you have a php version of it?
Thread Starter
luxman
(@luxman)
It’s not getting saved because I have the action=”__” as a php redirect, so I guess it doesn’t work with that one 🙁
Where does “__” go to when you submit?
Thread Starter
luxman
(@luxman)
This is the form I am trying to use:
<form method="post" action="http://www.submitareview.com/forwardpin.php"><input type="text" name="id" class="textinputpin" value="Enter-Business-ID#-Here" onclick="this.value='';"><input type="submit" value="Continue" class="submit-pin"></form>
Thread Starter
luxman
(@luxman)
I am trying to track and record the keywords people are placing within the form, where it says “enter-business-id#-here”.
To capture data in the database, you would need to add [cfdb-save-form-post] to your forwardpin.php file since that is where the form gets submitted. That assumes that is a wordpress post or page. I’m guessing that is not the case here. So you would instead need to add code to the forwardpin.php file:
require_once(ABSPATH . 'wp-content/plugins/contact-form-7-to-database-extension/CFDBShortCodeSavePostData.php');
$saveForm = new CFDBShortCodeSavePostData();
$saveFom->handleShortcode(null);
which should be equivalent to calling the short code (although I haven’t tried it). Come to thing of it, you may not have ABSPATH defined, so you would use
require_once('/YOUR-SYSTEM-PATH-TO/wp-content/plugins/contact-form-7-to-database-extension/CFDBShortCodeSavePostData.php');
replacing YOUR-SYSTEM-PATH-TO for the actual filesystem path.
Thread Starter
luxman
(@luxman)
thanks for the help Michael, unfortunately it still isn’t logging the information that’s placed into the form 🙁 This isn’t a basic wordpress option so I understand why it won’t work.
Thread Starter
luxman
(@luxman)
Not sure if this helps but I got this error:
Fatal error: Call to a member function handleShortcode() on a non-object in /mypath/ on line 4