Inicio › Toolset Professional Support › [Resuelto] Hide Edit Cred form link
Problem:
How to display cred edit form link to only logged in users.
Solution:
To conditionally display content for only logged in user, you can use views [wpv-current-user] shortcode. You can check user is logged in or not:
You can find proposed solution with the following reply:
https://toolset.com/forums/topic/hide-edit-cred-form-link/#post-402133
Relevant Documentation:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
=> https://toolset.com/documentation/views-shortcodes/#wpv-current-user
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)
Etiquetado: Content-submission forms, Toolset Forms
Documentación relacionada:
This topic contains 2 respuestas, has 2 mensajes.
Last updated by Daniella hace 7 años, 11 meses.
Assisted by: Minesh.
I have a Create Content CRED form on a password protected page to create an Entertainer (CPT). Once the form is filled out, my client is redirected to the Post page that was just created. An example would be:
hidden link
My client needs to be able to edit the form in case things change. So I cloned the original form and set it to be an "Edit" form. I then added the following to the Entertainer Content Template.
[cred_link_form form='8595' form_name='Entertainment Edit' text='Edit %TITLE%' target='_self']
How can I have the link to Edit only visible to signed in users and my client?
Thanks!
Hello. Thank you for contacting the Toolset support.
To conditionally display content for only logged in user, you can use views [wpv-current-user] shortcode. You can check user is logged in or not:
For example:
[wpv-conditional if="('[wpv-current-user info='id']' eq '')"] User is not logged in [/wpv-conditional]
Or
You can check user role. For example:
[wpv-conditional if="( '[wpv-current-user info='role']' eq 'your-role-name' )"] display your content [/wpv-conditional]
Where:
Replace "your-role-name" with your original role name.
More info:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
=> https://toolset.com/documentation/views-shortcodes/#wpv-current-user
Thank you so much!