I have managed to create a view that lists all users of a certain role, see hidden link
The main part of this view is the following code:
The urls in the dropdown created by this view are like hidden link where the number at the end is the variable user-id, but all user-id's open a page with the same user, so the url parameter is not working.
The view to open the cred form has this code inside the loop: [cred_user_form form="bewerk-profiel-door-gebruiker" user="[wpv-user field='ID']"]
It appeared that the view containing the edit user form was served from cache. I found the setting to turn the cache off when inserting the view in a page.
[wpv-view name="test-view" cached="off"]
Moreover I found out how to pass an url parameter to a user form. I will put the code below for other users to view, as I could not find this in the docs.
Inside the loop of the view that shows the edit user form:
is a custom function I put inside functions.php of the child theme. Here is the function:
add_shortcode( 'get_cred_urlparam', 'cred_field_urlparam');
function cred_field_urlparam($attr) {
return $_GET['user_id'];
}
Since I only needed the url parameter 'user_id' I could keep it this simple.
If you know a better way to add an url parameter to a cred user form, please let me know.
This works.