Please look at this↓(Can you login?)
hidden link
I made User Field Group("Sample").
User Fields are "Display item A(Radio)","Item A(Single line)","Display item B(Radio)","Item B(Phone)".
If "Display item A" is "Yes",I want to display "Item A".
If "Display item B" is "No",I don't want to display "Item B".
Can I do something like this with Views or tIn other ways?
--------------
Like this
--------------
if("Display item A")
{
Display "Item A"
}
if("Display item B")
{
Display "Item B"
}
--------------
* I can not use PHP much.
Dear 直子,
Yes, it is possible within Views shortcode [wpv-conditional], see our document:
Checking Types Fields and Custom Fields
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/checking-types-fields-and-custom-fields/
And I can not login your website, if you need assistance for it, please provide the credentials of your website in below private detail box, I can setup a demo for you.
I have tried the credentials you provided, but get this error:
ERROR: The password you entered for the email address info@ufficio-di-fibonacci.com is incorrect
Please check it, thanks
So sorry!
I changed the password of the private message I sent before.
Thanks for the details, since you are using custom user field, so you will need to use the user shortcode insider the shortcode [wpv-conditional], for example:
[wpv-conditional if="( '[types usermeta='display-item-a'][/types]' eq 'Yes' )"]This field has value "my value"[/wpv-conditional]
More help:
Using shortcodes in conditions
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-shortcodes-in-conditions/
I can do it!
Thank you very much!
I wrote like this.
↓
[wpv-conditional if="( '[types usermeta='display-item-a'][/types]' eq 'Yes' )"][types usermeta='item-a'][/types][/wpv-conditional]
[wpv-conditional if="( '[types usermeta='display-item-a'][/types]' eq 'No' )"]-Do not display item A-[/wpv-conditional]
[wpv-conditional if="( '[types usermeta='display-item-b'][/types]' eq 'Yes' )"][types usermeta='item-b'][/wpv-conditional]
[wpv-conditional if="( '[types usermeta='display-item-b'][/types]' eq 'No' )"]-Do not display item B-[/wpv-conditional]