• Resolved zakalwe

    (@zakalwe)


    Seeing this PHP Notice occur a few times in our logs and wondered if this is being looked into?

    PHP Notice: Undefined index: fields-save-toggle in /public_html/wp-content/plugins/ninja-forms/includes/Actions/Save.php on line 181

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi there,

    I also just started getting this error too.
    I’ll also see if I can figure it out.

    Thanks

    Andi

    Ok Found the issue.

    In each form, under emails and actions > submission you need to make sure you have something selected in Designated Submitter’s Email Address, when you first install Ninja Forms this is left blank, hence there is no index on line plugins/ninja-forms/includes/Actions/Save.php on line 181 in …

    $save_all_none = $action_settings[ 'fields-save-toggle' ];

    Should have some sort of negation…

    $save_all_none = (isset($action_settings[ 'fields-save-toggle' ]) ? $action_settings[ 'fields-save-toggle' ] : 'save_none');

    further down on lines 196 looks for an else of save none…

    } // Otherwise... (We were told to save no fields.)
                else if( 'save_none' == $save_all_none ) {

    Hope this helps.

    Sorry guys another one…
    <br />?<b>Notice</b>: Undefined index: attach_csv in <b>/wp-content/plugins/ninja-forms/includes/Actions/Email.php</b>

    Seems you might have to look at making sure you save your form submission settings etc… Or building in negation into these handlers.

    Thread Starter zakalwe

    (@zakalwe)

    Thanks for looking into this. The config fix you supplied seems to have done the trick! Hopefully Ninja Forms will flag this as a necessary field or code up to not generate anything in the logs.

    Plugin Contributor Justin McElhaney

    (@jmcelhaney)

    Can you update Ninja Forms to the latest version and let me know if you are still receiving this error?
    If you continue to have issues, can you contact us through our official support page: https://ninjaforms.com/contact/

    Thanks for the fix, Andi! This was stopping forms from redirecting after success, so our signup flow was broken there for a bit.

    This appears to be a new option for GDPR compliance, and still affected me on version 3.3.20. It would have been nice for Ninja Forms to default the setting to the only email field on the form, but this was a quick enough fix.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP Notice: Undefined index: fields-save-toggle’ is closed to new replies.