Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter bbeweb

    (@bbeweb)

    That sounds excellent. Checkboxes doesn’t always work for yes/no decisions because checkboxes can be ignored by users, however a required group of two radiobuttons will get the users attention if they miss it. Sometimes you might also have options such as ‘monthly’ or ‘yearly, etc., that can’t be replaced with one checkbox.

    More importantly, I’m currently redoing a form for a client and if I were to change their ‘Yes/No’ radiobuttons to a checkbox, they would go into a frenzied panic because the form would look slightly different and we don’t want that..:)

    Your new filters sounds great, let me know if you want me test anything on the form I’m building.

    Thread Starter bbeweb

    (@bbeweb)

    Hi Felix,

    My use case is situations where you have a fairly big form and some questions on that form are yes/no radiobuttons and others are ticking a list of 5-8 checkboxes. The yes/no radiobuttons would take up less vertical space (so less scrolling) if placed inline but the radioboxes would be a lot easier to read if placed on individual lines.

    I can understand the argument of not overcomplicating the plugin and this is not a deal breaker for me, but it would be great to have this option. The website isn’t live yet, so I can’t show you the form, but should go live next week so I can show you an example then.

    Thread Starter bbeweb

    (@bbeweb)

    Hi Felix,

    Thanks for that, it works but it makes all groups inline. I only want some groups to be inline, not all of them (sorry to be difficult). Not a biggie if it can’t be done, but ideally I would like to have the ability to make groups inline by setting inline group layout for specific groups only.

    Thanks,
    Bjorn

    Thread Starter bbeweb

    (@bbeweb)

    I have passed it in to my function, the problem seems to be in /wp-admin/users.php, line 265 (in WordPress version 4.2.2).

    The userIDs for the user or users to be deleted are stored in an array called $users in line 203-206, but on line 265, it says:

    do_action( 'delete_user_form', $current_user );

    So, from what I can tell, the ‘delete_user_form’ hook sends $current_user (the logged in user) and not $users (the user or users to be deleted) as per the documentation in the codex.

    My solution, for now, will be to copy lines 203-206 in my hooked function, then I’ll get the userIDs for the user or users to be deleted.

    You can add a couple of hooks in your child theme’s functions.php file, to achieve this. See examples below:

    To redirect to a custom page, such as a page only logged in users have access to:

    add_action( 'switch_to_user', 'switch_to_user_redirect' );
    function switch_to_user_redirect()
    {
    	wp_redirect( home_url( 'userpages/mydetails' ) );
    	exit();
    }

    To redirect back to the main wp admin page:

    add_action( 'switch_back_user', 'switch_back_user_redirect' );
    function switch_back_user_redirect()
    {
    	wp_redirect( home_url( 'wp-admin' ) );
    	exit();
    }

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