• Resolved pjones21983

    (@pjones21983)


    hi

    Every time i try to submit and collect the data in the plugin, the data is always old data.

    Forminator_Form_Entry_Model Object ( [entry_id] => 243 [entry_type] => custom-forms [form_id] => 62 [draft_id] => [is_spam] => 0 [date_created_sql] => 2025-04-10 19:34:55 [date_created] => 10 Apr 2025 [time_created] => Apr 10, 2025 @ 7:34 PM [meta_data] => Array ( [name-1] => Array ( [id] => 1631 [value] => not the value) [name-2] => Array ( [id] => 1632 [value] => also not the value) [address-1] => Array ( [id] => 1633 [value] => Array ( [zip] => ST5 7NY ) ) [text-1] => Array ( [id] => 1634 [value] => doom3 ) [email-1] => Array ( [id] => 1635 [value] => [email protected] ) [_forminator_user_ip] => Array ( [id] => 1636 [value] => its.an.ip.address ) ) [table_name:protected] => wp_frmt_form_entry [table_meta_name:protected] => wp_frmt_form_entry_meta ) 1Array ( [FirstName] => name [LastName] => not my name [Email] => [email protected] [Telephone] => [Postcode] => ST5 7NY [Password] => [Username] => doom3 )

    please bear in mind that the time i submitted this data was 23:42. it seems like the form is being cached.

    • This topic was modified 1 year, 1 month ago by pjones21983.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    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

    Thread Starter pjones21983

    (@pjones21983)

    Hi

    i tried those settings and the same result.

    Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    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`

    Thread Starter pjones21983

    (@pjones21983)

    Thread Starter pjones21983

    (@pjones21983)

    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']

    }
    Thread Starter pjones21983

    (@pjones21983)

    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.

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    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

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    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

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘won’t submit latest inputs’ is closed to new replies.