Hi @pjones21983,
Could you also check whether “Ajax” enabled under Forminator Pro > Forms > Behavior, ie under “Method” and “Rendering”?
If the issue is still the same with Ajax enabled, could you please check and see how it behaves if you enable the “Prevent page caching on form pages” option under Forminator Pro > Forms > Behavior > Rendering.
Does it cause the same issue or not with the above option enabled? It would help in ruling out if the cache has a role or not.
Regards,
Nithin
Hi
i tried those settings and the same result.
Hello @pjones21983,
I hope things are going well for you.
Could you please share the form export with us so we can review your case further?
To share the form export
– Navigate to the “Forminator -> Forms” page in your site’s back-end
– click on a little “gear” icon next to the form in question
– select “Export” option
– copy given export code and paste it at https://pastebin.com
– include link to that paste in your response below.
Note: This export will not include any already submitted data – they’ll stay safely on your site, and we don’t need them anyway.
–
Kind Regards,
Imran Khan`
if it helps here is the code for the plugin
add_action("forminator_form_submit_response", "save_fielder_details", 10, 3);
//add_filter( 'wp_authenticate_user', 'wp_authenticate_custom', 13, 2 );
add_filter( 'wp_authenticate', 'custom_authenticate_username_password', 10, 3 );
add_action( "template_redirect", "my_function",7 );
add_filter( 'wp_nav_menu_objects', 'epc_wp_nav_menu_items', 10, 2 );
function save_fielder_details($response, $form_id ) {
if ($form_id === "62") {
register_data($form_id);
}
return $response;
}
function register_data($form_id) {
$entries = Forminator_Form_Entry_Model::get_latest_entry_by_form_id( $form_id );
// $file = $entries->meta_data['upload-1']['value']['file'];
echo print_r($entries);
$data = array(
'FirstName' => $entries->meta_data ['name-1']['value'],
'LastName' => $entries->meta_data ['name-2']['value'],
'Email' => $entries->meta_data ['email-1']['value'],
'Telephone' =>$entries->meta_data ['phone-1']['value'],
'Postcode' => $entries->meta_data ['address-1']['value']['zip'],
'Password' => $entries->meta_data ['password-1']['value'],
'Username' => $entries->meta_data ['text-1']['value']
}
I now Have a very good solution to my problem. Dont use forminator. Use a custom html block and write your own form. life is so much easier.
thanks for the help.
Hi @pjones21983,
I understand the decision to use a custom HTML form as the plugin didn’t meet your needs or added complexity to your setup.
However, while reviewing your form setup and the issue you experienced, I noticed that the “Store Submissions in Database” option is currently disabled for this form. The method you were using, get_latest_entry_by_form_id( $form_id ), relies on form data being saved in the database in order to retrieve the most recent entry. Since submissions were not being stored, the function could not return any data, which led to the unexpected result.
https://ibb.co/LhqKJHxh
https://wpmudev.com/docs/api-plugin-development/forminator-api-docs/#method-get_latest_entry_by_form_id
I hope this information helps. Please feel free to get back to us if you need any further clarification.
Best Regards,
Nebu John
Hi @pjones21983,
Since we haven’t heard from you for a while. I’ll mark this thread as resolved for now. Please feel free to re-open this thread if you need any further assistance.
Best Regards,
Nithin