Quantcast
Channel: Topic Tag: database | WordPress.org
Viewing all articles
Browse latest Browse all 11076

Michael Simpson on "[Plugin: Contact Form DB] Multiple forms submit to one database"

$
0
0

These are all be listed in the database under their different form names, but when retrieving information in a short code, you can get data from multiple forms as once as if they were just one form.

You can set form="*" to get information from all forms or list the form names using form="form1,form2,form3 in a short code.

But if you really want to make the data all go into the same form name, follow the directions on changing data before it is saved wherein you can intercept the form submissions and change their form name.

function change_title($formData) {
    if ($formData && in_array($formData->title, array('form1', 'form2', 'form3')) {
       $formData->title = 'THE CONSOLIDATED FORM NAME YOU WANT";
    }
    return $formData;
}

add_filter('cfdb_form_data', 'change_title');

Viewing all articles
Browse latest Browse all 11076

Trending Articles