Home › Toolset Professional Support › [Closed] Hide Conditional Group for Logged in Users
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 5 replies, has 2 voices.
Last updated by Minesh 1 year, 5 months ago.
Assisted by: Minesh.
Hi can you help me, i have a form that has several fields on it that i do not need logged in users to fill out. I have found the Conditional Group section on the Form area and put several fields in that. However, I dont know how to hide all the fields int eh Conditional Group based on if the user is logged in or not. I dont write code but i had AI help me create this code and I put it in the edit conditions manually section. It worked as far as hiding the items, but it is hiding them for both logged in an out users. Can you help me? Thanks!
Hello. Thank you for contacting the Toolset support.
In that case - what if you try to use the following code - just add your fields that you want to hide to the following conditional statement:
[wpv-conditional if="('[wpv-current-user info='id']' eq '')"] Not Logged in - add your fields you want to hide for loggedin users [/wpv-conditional]
Where:
- We are checking that if logged in user ID is empty then show the fields.
Oh but how do i add the fields? What do i use?
Can you watch this? hidden link
What you should do is edit your form and remove the conditional statement you added and save the form.
Then you should activate the "Expert Mode" for your form this will allow you to edit your form in code editor and then copy/paste the conditional I shared and move the fields you want to hide within the conditional shortcode I shared and save your form and test.
Ok i guess this is challenging for me because i dont really write code. I also have a lot more things to add to the form... So maybe I will wait to the end and then add it. It would be great if this were an option without having to eitd the code : )
There is no such option, you will have to add the conditional I shared on your edit post form.
If you need any help, please finish your edits first and then let me know what fields you want to hide and I'm happy to add solution on your behalf but for that I will require admin access details.
*** 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.
The topic ‘[Closed] Hide Conditional Group for Logged in Users’ is closed to new replies.