I need help and advice.
I want the display some fields on the front page forms to only appear according to the user’s login or username.
For example, I have a form, in the form there are four fields, we name the fields as field A, field B, field C and field D.
i want how it looks in a front-page form when the users logon:
field A can only be seen by Jhonny
field B can only be seen by Tommy
field C can only be seen by Jerry
field D can only be seen by Tommy and Jerry, jhonny can’t see.
I’ve used conditional logic but it doesn’t work.
Please advise or if there is a paid plugin that can do my request, please let me know.
Hello dwiyanto. What if you populated a hidden form field with with the ID or username of a logged in user? You can use the user merge tags as default value for a field. When the form is rendered, that field will then hold the username or ID, however you have set that up. Here is the documentation for the user merge tags:
Then, you can use conditional logic on your other fields, so that when your hidden form field contains the ID or username for Tommy, you should field B (for example). Would that work for you?
GravityWiz has a good article about doing something like this as well: