I'm loving finding out about CB substitutions, but am stumped.
I have a field delimiter that shows a button depending on another field as shown below:
Code:
[cb:if user="#me" cb_userprofilelevel="member"]<form method="post" action="/somewhere"><button class="button">Go</button></form>[/cb:if]
[cb:if user="#me" cb_userprofilelevel!="member"]<form method="post" action=""><button disabled class="button">Go</button></form>[/cb:if]
This works and adds the button depending on the field cb_userprofilelevel.
What I need is to not show this button if the current logged in user is viewing their own profile.
I have tried the following code, but no button is displayed on any profile:
Code:
[cb:if user="#me" cb_userprofilelevel="member" AND user_id!="myid"]<form method="post" action="/somewhere"><button class="button">Go</button></form>[/cb:if]
[cb:if user="#me" cb_userprofilelevel!="member" AND user_id!="myid"]<form method="post" action=""><button disabled class="button">Go</button></form>[/cb:if]
Also, why doesn't this work:
Code:
[cb:if user="#me" cb_userprofilelevel!="member" AND user="#displayed" cb_userprofilelevel="member"]<form method="post" action=""><button disabled class="button">Go</button></form>[/cb:if]
What am I doing wrong?