Okay
  Public Ticket #898300
Contact Form Database
Closed

Comments

  •  2
    Marcus started the conversation

    Hi!

    I really like the design of the Contact Form and are wondering if there is a possibility to save the submissions sent through the Contact Form in a database in WordPress.

    Thanks in advance.
    /Marcus

  • [deleted] replied

    Hi Marcus,

    Actually this is not implemented however you can add your implementation in this file:

    wp-content/themes/kalium/inc/lib/vc/lab_contact_form/init.php

    On line 173 you can add the code to insert the data in database, for example:

    $contact_form_messages = get_option( 'contact_form_messages' );
    
    if ( ! is_array( $contact_form_messages ) ) {
        $contact_form_messages = array();
    }
    
    $contact_form_messages[] = array( $email_receiver, $subject, $message_body, time() );
    
    update_option( 'contact_form_messages', $contact_form_messages );

    This should work for you.