Skip Navigation

[Resolved] Edit user form generic filed (Custom Capability)

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 24 replies, has 2 voices.

Last updated by Minesh 1 year, 4 months ago.

Assigned support staff: Minesh.

Author
Posts
#2156795
Screenshot 2021-09-01 at 07.53.38.png

Tell us what you are trying to do?

1. On the front-end I need to make a tool to edit field-values for Users. I've created an Edit User form for fronted secured area (restricted by Access), I need to enter user ID on top of form, and show Edit User form below for a given user.

Right now I'm only get edit for for current user (Admin).
What is better solution for this? (looks like Toolset doesn't have an search and filter functional for Users).

2. the values I need to add are in a special field of S2member (based on standard Custom Capabilities) from User master data. Because it works in admin is there a way to "call" it from front-end (see attached, these is an User edit admin page). This field is not seen in list of available in Toolset Settings, what is the better way to add it in form?

I used, but still can't get a solution :
https://toolset.com/forums/topic/how-to-allow-a-user-to-edit-a-different-user-vis-front-end-user-form/
https://toolset.com/forums/topic/add-url-parameter-on-views-submit/

#2156869

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please share details where you added the Edit user form and what form you created. And using what role you want to allow the users to Edit the user form.

(looks like Toolset doesn't have an search and filter functional for Users)
What we can do is create a view that lists the users you want and then besides user information row we can add the Edit User form link. Will that work?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2156885

(looks like Toolset doesn't have an search and filter functional for Users)
What we can do is create a view that lists the users you want and then besides user information row we can add the Edit User form link. Will that work?

the only thing here - I need to filter from all users for 1 or 2 values, anyway let's see the first draft of how it goes

Waiting for you feedback, Minesh!

#2156889

Minesh
Supporter

Languages: English (English )

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

When I visit the following page: hidden link

I do not see any form.

Have you correctly granted the Access permission to your specific form: [from section "User Forms Frontend Access"]
=> hidden link

#2156893

Dear Minesh!
Please see lines 2-3 of previous private message, added correct user / pwd there!

#2156909

You have to be logged in - this is protected from guests area ( you are superadmin, I'll see it anyway!)

#2156911

Minesh
Supporter

Languages: English (English )

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

When I logged I see this on the the link you shared: hidden link

#2156913

Moment

#2156917

please make next reply private, I'll sent you another user

#2156921

Dear Minesh,
please see lines 2 and 3 of note to previous private reply, added correct usr | pwd

#2156977

Minesh
Supporter

Languages: English (English )

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

I can see on the page something now but could you please share the screenshot where I can see the form on the page. I see four tabs each having the form but I do not see the following form you are talking about.

[cred_user_form form="z-sht-ccap_edit" user="[wpv-search-term param='users-filter']"]

Also, I do not see any URL param on URL that you are passing as user "users-filter". Can you please share step by step info to reach the form as well as from where I can get the URL param?

#2156979
Screenshot 2021-09-01 at 13.57.12.png

I've wrote it in initial message, the page is hidden link then open 2nd toggle called "... Полномочия ССАР Edit"
please find screenshot attchd:

PS is there way to share desctop to fasten process ( may be AnyDesk )?

#2157033

Minesh
Supporter

Languages: English (English )

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

We only offer the email support that is why other communication alternative will not be possible.

I checked and the the field "Custom Capabilities" you are talking about is belongs to another plugin and that you want to use with Edit user form. There is no native way to do it.

However, workaround would be to add a generic field with the same name i.e. "ws_plugin__s2member_profile_s2member_ccaps" (you should check the HTML source to know the field name) and as a default value to that generic field you will have to write the custom shortcode that should return the saved value for that field for your desired user and the shortcode should return the saved value to that field.

You will have another task as well - you will have to use the Toolset form's hook cred_save_data to save the value of the generic field you added to your form, you will have to save the field value as per the standared used by the "s2member" plugin, as you shared it uses the serialized value OR you can check your database and postmeta table and check how exactly the metakey "ws_plugin__s2member_profile_s2member_ccaps" is stored.

#2157091

Ok, thats the workaround with that field I will try,
But how can I select another user on view/form implemented?

Have you been able to see edit CCap form like I send you screenshot?

Lets get back to this:
“ looks like Toolset doesn't have an search and filter functional for Users)
What we can do is create a view that lists the users you want and then besides user information row we can add the Edit User form link. Will that work?

Please feel free to customize view “Test Usr Edit FrntEnd” in Admin area. This view connected with user form me mentioned earlier.

#2157103

Minesh
Supporter

Languages: English (English )

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

Can you please first tell me on what page you want to list users and what users you want to list with Edit user form link?