• Resolved diegora

    (@diegora)


    I couple of years ago I used a snippet to create fields in the Form Settings backend menu so I could fill some extra configuration that I loaded on the form to create a dynamic form. Not going into full detail of the snippets, but basically saving a specific Select field selection on form submission, and counting the amount of times each selection was submitted so I would remove it from the form when it reached a max number that I would also set in the Settings Menu. Very similar to this https://www.billerickson.net/code/wpforms-dynamic-availability-in-booking-form/

    But now the function
    wpforms()->form->update( “form id”, $form_data );
    is wrapped around a wpforms_current_user_can() check, so the user needs to be logged in and have it’s role allowed in “edit_form_single” in Settings>Access, So not logged in users’ form submissions don’t update the Custom Settings in my form.

    What is the recommended substitute for the wpforms()->form->update( “form id”, $form_data ); that used to work until a “recent” change that included this Access Control??

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @diegora,

    I apologize as customizations like this is outside of our scope for support. In case you’d like to look into custom development options, we highly recommend using Codeable.

    Thanks!

    Thread Starter diegora

    (@diegora)

    I’m not looking into custom development.
    I’m asking what’s the plugin recommended substitute to the old wpforms()->form->update() since it no longer works to update the backend settings page because the function cannot be used anymore by form submissions from regular visitors after a “recent” update. And your Documentation pages says nothing about it.

    Hey @diegora,

    We spoke with one of our developers and they advised that the following snippet should resolve the issue:

    wpforms()->form->update( $form_id, $form, [ 'cap' => false ] );

    When you have a moment please give this a try.

    Thanks!

    Hi @diegora,

    We haven’t heard back from you in about a week, so I’m going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.

    Thanks!

    Thread Starter diegora

    (@diegora)

    worked. thanks.

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

The topic ‘wpforms()->form->update substitute’ is closed to new replies.