Guido on "[Plugin: Contact Form DB] Include support for another contact form in CFDB"

ساخت وبلاگ

Hi Michael,

I'm the author of Very Simple Contact Form and would like to offer a feature to save form submissions in the database and view them in dashboard.

Before building this feature I'm wondering if you are interested to include support for my plugin in CFDB?

Kind regards,

Guido

https://wordpress.org/plugins/contact-form-7-to-database-extension/

I'd be happy to. I would need your plugin to provide a hook that you call when a submission happens that CFDB can subscribe to. I would need this information passed: form name, field name -> field value for each. For files, I need the field name, file name, and how to get the file itself.

Hi Michael,

Do you have an example which I can use perhaps? Or a tutorial somewhere on the web? My form only contains a few static fields, so I guess/hope it's not that difficult to build this hook.

Guido

If you code to the following example, you can call a CFDB hook and make it work. Then it will not require any changes in CFDB:
http://cfdbplugin.com/?page_id=646

Otherwise, if you create your own hook, then I need to update CFDB to connect to your hook and organize the data for CFDB to process. That is typically what I do with plugins that have pre-existing hooks.

Hi Michael,

Don't have experience with your plugin yet, but I will start working on the example hook you gave me. But you are free to provide me this hook as well, so I can integrate it in my plugin VSCF asap ;-)

Guido

I haven't looked at your code. But is there a file/function that is called when a form is submitted?

Hi Michael,

No, it's being processed via the php POST method in the same file > it's very simple ;-)

I haven't looked at your tutorial/example yet..

Guido

If you add the following "do_action" call in your vscf-form.php file, then I'll do the rest.

if ($error == false) { // Hook to post-process form data do_action( 'vscf_before_send_mail', $form_data ); $to = $vscf_atts['email_to'];
...

Hi Michael,

So just add a single line?

do_action( 'vscf_before_send_mail', $form_data );

Just to be sure, VSCF contains 2 forms, for page and for widget. When adding this in both files, this will not create a conflict with your plugin?

Update: I notice you've already added my form in your plugin. After pressing submit the submission is saved. Great. But it doesn't work in frontend. Because the 'thank you' page isn't displayed.

Guido

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 214 تاريخ : شنبه 25 ارديبهشت 1395 ساعت: 17:19