Forum Replies Created
- AuthorPosts
oivanr
ParticipantThanks a lot. I will try.
oivanr
ParticipantHi Ally,
As usual it works perfectly.
Thanks a lot,oivanr
ParticipantHi Ally,
I am using the database area in the form configuration.
1) The date is still saving 0000-00-00
2) How I can get the name and the last name separately
Thanks,oivanr
ParticipantDear Ally,
You are right the function has a problem.
I already find the problem, I did not include a single quote in the eleventh data value.
Thanks for your help,oivanr
ParticipantSend you the file here too
Attachments:
You must be logged in to view attached files.oivanr
ParticipantI’ve already send you a mail the sender is oivanr.
Thanksoivanr
ParticipantIt works fine.
Thanks a lotoivanr
ParticipantI am using this code in a plugin:
add_filter(‘quform_post_validate_7’, function ($valor, $key, Quform_Form $form)
{
$args = array(
‘search’ => $form->getValueText(‘quform_7_3’),
‘search_columns’ => ‘user_email’
);$user_query = new WP_User_Query( $args );
if ( empty( $user_query->get_results() ) )
{
$valor = ‘Not found’;
$form->setValueText(‘quform_7_4’)->$valor;
}
else
{
$usuario = $wp_user_query->get_results();
$valor = $usuario->display_name;
$form->setValueText(‘quform_7_4’)->$valor;
}return $valor;
}, 10, 2);oivanr
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
oivanr
ParticipantI had found this at the log file, maybe this is useful.
oivanr
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,oivanr
ParticipantBy the way, I already use the debugg and there is no messages there
oivanr
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
- AuthorPosts