• Resolved getaka

    (@getaka)


    I have form submission access set to “only members” in Flexi Submission Form settings. I am using the following code in the post whose link is given.

    [flexi-form title="Submit to Flexi" name="my_form" ajax="true" attach="true" id=""]
    <div class="fl-field"><label class="fl-label fl-label fl-has-text-dark" for="user-submitted-title">Name*</label><div class="fl-control"><input type="hidden" name="user-submitted-title" value="India Eisley" placeholder="" class="namefield"><input type="text" name="user-submitted-title" value="India Eisley" placeholder="" class="namefield" readonly=""></div></div>
    [flexi-form-tag type="article" title="Description" placeholder="Write few words about the celebrity (optional)"]
    [flexi-form-tag type="tag" title="Insert tag"]
    [flexi-form-tag type="file" title="Select file*" required="true"]
    [flexi-form-tag type="submit" name="submit" value="Submit Now"]
    (Note: * required)
    [/flexi-form]
    <ol>
    <li style="color:#990000;">Do not upload any gross or explicit photo</li>
    <li style="color:#990000;">Do not upload any photo with copy rights</li>
    <li style="color:#990000;">Upload photos with maximum size less than 1 MB</li>
    </ol>

    I want visitors to login or register (if not registered yet) to submit Images with the title set by me. But the problem is, after login, visitor is redirected to users-dashboard instead of being on the same page he was on, before login.
    I am also using Ultimate Member for user’s profiling.
    I want visitor to remain on the same page after login or register. Is it possible to accomplish by any hook?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author odude

    (@odude)

    Hi,
    We are also notice of it, and as you suggested next update may have option to stay on same page where login from appear.

    If you want immediate output,
    edit the file
    \wp-content\plugins\flexi\includes\functions.php

    At function flexi_login_link()

    Comment out (Approx. line no. 427)
    //’redirect’ => flexi_get_button_url(”, false, ‘my_gallery’, ‘flexi_user_dashboard_settings’)

    Thread Starter getaka

    (@getaka)

    Thanks for your support.
    I need another support to make it work as just I like. How can I fetch post by title? My requirement is something like this;
    [flexi-gallery title=”Selena Gomez”]
    Please support.

    Thread Starter getaka

    (@getaka)

    Hi,
    commenting out //’redirect’ => flexi_get_button_url(”, false, ‘my_gallery’, ‘flexi_user_dashboard_settings’), is not helping. It is still getting redirected to user-dashboard.
    I also have modified the form to include register link also. Please see the complete function.

    // Displays login link
    function flexi_login_link()
    {
        $output = '';
        $style_base_color = flexi_get_option('flexi_style_base_color', 'flexi_app_style_settings', '');
        $style_text_color = flexi_get_option('flexi_style_text_color', 'flexi_app_style_settings', '');
    
        $output .= "<div class='flexi_alert-box flexi_notice'>" . __('Login', 'flexi') . '</div>';
        $output .= "<div class='fl-box " . esc_attr($style_base_color) . ' ' . esc_attr($style_text_color) . "' style='padding:30px;'>";
        $args = array(
            'echo' => false,
            //'redirect' => flexi_get_button_url('', false, 'my_gallery', 'flexi_user_dashboard_settings'),
            'form_id' => 'loginform',
            'label_username' => __('Username', 'flexi'),
            'label_password' => __('Password', 'flexi'),
            'label_remember' => __('Remember Me', 'flexi'),
            'label_log_in' => __('Login', 'flexi'),
    		'label_register' => __('Register', 'flexi'),
            'id_username' => 'user_login',
            'id_password' => 'user_pass',
            'id_remember' => 'rememberme',
    		'id_register' => 'register',
            'id_submit' => 'wp-submit',
            'remember' => true,
            'value_username' => null,
            'value_remember' => false,
        );
    if(!is_user_logged_in())
        $output .= wp_login_form($args).' '.wp_register('','',false);
        do_action('flexi_login_form');
        $output .= '</div>';
        return $output;
    }
    Thread Starter getaka

    (@getaka)

    WP Fastest Cache was the problem.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Redirect to previous page after login’ is closed to new replies.