• Resolved soulwasted

    (@soulwasted)


    Hi guys,

    earlier I’ve made submission form using your ERF.
    It worked.

    Now when I want to submit the form
    — submit button loads but then it stays on that page
    — but new submission is made and also mail notification is sent

    It means that just redirection itself stopped working.
    I don’t know whether it’s my mistake, mistake of some new plugins or its updates or ERF update.
    No console errors, no PHP errors :/

    You are my last resort.
    Do you have a clue?

    Thank you!
    pep?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author easyregistrationforms

    (@easyregistrationforms)

    Hello,

    Please provide us your form URL and if possible please contact us on [email protected] since we would require more details and dashboard access in order to debug the issue at your end.

    Looking forward to hearing from you.

    Thread Starter soulwasted

    (@soulwasted)

    Hi.

    I’ve found that.
    It was my mistake. Sorry making waves ??

    I have this in my theme’s functions.php:

    add_action('admin_init', 'disable_dashboard');
    function disable_dashboard() {
        $user = wp_get_current_user();
        $allowed_roles = array('administrator', 'librarian', 'almost_admin', 'fz_user', 'tendr_user');
        if(!array_intersect($allowed_roles, $user->roles)) {
            wp_redirect(home_url());
        }
    }

    This is how I handle disabling dashboard for some roles. Because they should login and do things just on frontend.

    Do you have any suggestions how to make to work with your forms?

    Plugin Author easyregistrationforms

    (@easyregistrationforms)

    Hi there,

    Thank you for the information. Our plugin uses Ajax to handle form submission and redirection. If you can exclude your code for Ajax requests then it should work fine. You can check for Ajax requests with the following code:
    if (defined(‘DOING_AJAX’) && DOING_AJAX){ // Your code
    }

    Thread Starter soulwasted

    (@soulwasted)

    Oh.

    You are awesome!
    Thanks again!

    @soulwasted is this code you showed to disable WordPress Account tabs in top right corner ? As I think this is what I’m fighting with currently. I have like wordpress backend login options shown on my page after user is logged in to ERF account.
    I will be grateful for your help as I can’t find anything regarding this matter.
    Thanks

    Thread Starter soulwasted

    (@soulwasted)

    @maryando I think that this didn’t work in some cases. So I threw out this code.
    Workaround: New members has role “editor” and I disabled everything using Adminimize plugin.
    Hope this helps.

    @soulwasted thank you I have found another way too.
    I have entered this code to my functions.php

    add_filter('show_admin_bar', '__return_false');

    This will disable WordPress top bar for good and problem solved.
    Now customer can only see ERF account and this is what I was looking for hope it will help you too.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Redirect after submission stopped working’ is closed to new replies.