Home › Forums › Quform WordPress › Saving entries
- This topic has 8 replies, 2 voices, and was last updated 7 years, 3 months ago by
Ally.
- AuthorPosts
- January 17, 2018 at 6:15 am #23903
oivanr
ParticipantI 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,January 19, 2018 at 10:05 am #23950Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
January 22, 2018 at 1:12 am #23972oivanr
ParticipantHi Ally,
I am using Quform 2.0.11) 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
January 22, 2018 at 3:44 am #23975oivanr
ParticipantBy the way, I already use the debugg and there is no messages there
January 24, 2018 at 11:40 am #24025Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
January 26, 2018 at 5:20 am #24098oivanr
ParticipantHi 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,January 26, 2018 at 2:55 pm #24109oivanr
ParticipantI had found this at the log file, maybe this is useful.
January 26, 2018 at 2:56 pm #24110oivanr
ParticipantI 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
February 1, 2018 at 12:32 pm #24177Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.