Saving entries

Home Forums Quform WordPress Saving entries

This topic is: not resolved
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #23903
    oivanr
    Participant

    I have a couple of issues:
    1) I have a form with 98 entries and I want to save in a single row, I already try but it doesn’t work
    2) Is possible to create a shortcode to save to multiple tables and not changing the theme php functions?
    Thansk,

    #23950
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #23972
    oivanr
    Participant

    Hi Ally,
    I am using Quform 2.0.1

    1) I will check with your suggestions, I did not already,
    2) About the 2nd item I have consulted your links an I have created a plugin with this code inside:

    function my_post_process($result, $form) // here I also have used this Quform_Form $form instead of $form
    {
    // Custom code
    global $wpdb;

    $tabla = “tv_test1”;

    // $datos = array(
    // ‘p1’ => $form->getValueAsString(‘1_3’),
    // ‘p2’ => $form->getValueAsString(‘1_4’)
    // );

    $data = array(
    ‘id_registro’=>Null,
    ‘nombre’ => ‘NameValue’,
    ‘fecha_prueba’=>’DateTest’, // in this case I am using characters instead of date by now
    ‘p1’ => ‘ValueP1’,
    ‘p2’ => ‘ValueP2’
    );

    $wpdb->insert($tabla, $data);

    return $result;

    }

    add_action(‘quform_post_process’, ‘my_post_process’,10,2);

    Although the page where the form is say that everything inside is fine, nothing is been recorded at table.

    Like you can notice I am simplyfing things using text instead the values, what I have to do after everything goes right.

    I enable and disable the option to save date in my own table in the form options but everything is the same.

    Thanks for your help

    #23975
    oivanr
    Participant

    By the way, I already use the debugg and there is no messages there

    #24025
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #24098
    oivanr
    Participant

    Hi Ally,
    With the Quform::log($wpdb->last_error); appear a couple of lines at the debug log, so it is working.
    About your proposal I am not able to do right now because I am working in my localhost.
    I had changed the theme of the website and is the same, I saved the data of this form trough the database option and works fine, what do you think can happen?
    Regards,

    #24109
    oivanr
    Participant

    I had found this at the log file, maybe this is useful.

    #24110
    oivanr
    Participant

    I have found this at the debug file:

    [25-Jan-2018 18:46:47 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\tevo\wp-includes\wp-db.php on line 1942

    #24177
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy