Skip Navigation

[Resolved] Create a page where a specific role can create new member, display and edit them

This support ticket is created 6 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 3 voices.

Last updated by Minesh 6 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#628967

Hi,

I am trying to create a member page where a user with specific role can create user. i have manage to display user according to creator.

But i am having this problem in the editing button

Kindly go to

hidden link and go to the top right icon and click on supplier.
Login in using this account <see working notes>

You may go to
hidden link

This is a sample page whereby i have manage to display the user list created by this user. But when i click on edit. I fail to send over the user id to link to the user form to edit the user info

This is my loop code

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<table width="100%" border="1">
<thead>
<tr>
<th>Username</th>
<th>First Name</th>
<th>Last Name</th>
<th>E-Mail</th>
<th>Action</th>
</tr>
</thead>
<tbody class="wpv-loop js-wpv-loop">
<wpv-loop>
<tr>
[wpv-post-body view_template="Loop item in Display List of Staff"]
</tr>
</wpv-loop>
</tbody>
</table>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

This is my template for this view

<td>[wpv-user field="user_login"]</td>
<td>[wpv-user field="user_firstname"]</td>
<td>[wpv-user field="user_lastname"]</td>
<td>[wpv-user field="user_email"]</td>
<td>
<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#edit[wpv-user field='ID']">Edit</button>
</td>
<!-- Modal -->
<div class="modal fade" id="edit[wpv-user field='ID']" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Edit Profile - [wpv-user field="user_login" id="[wpv-user field='ID']"]</h4>
</div>
<div class="modal-body">

[cred_user_form form="edit-staff" user="190"]

</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>

I manage to figure out the display but the edit dont work accordingly. kindly assist

#629100
[cred_user_form form="edit-staff" user="190"]

This ShortCode will always edit user with ID 190.

You would need to pass a dynamic ID there.
When you insert the Edit User Form the GUI asks you what user to edit.
You will see you cannot choose to edit the "current user in the loop" but only the currently logged in user or another user.

Hence this requires a nested ShortCode where you tell CRED what to edit by passing a dynamic User ID:

[cred_user_form form="test" user="[wpv-user field='ID']"]

This should produce the CRED Form for each specific user in the loop.

#632289

Hi, I am stil. Trying this out.

#632310

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Ok - Let me know if you need further assistance.