Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 67836

Hide a fields content dependant on content of another field

$
0
0

Replies: 0

I am hoping this is simple enough for you to help me here.

I have created a custom list template and want to do the following:

I have a number of fields i.e. email, address, phone etc which for some records I do wish to be displayed. I also have a field named do_not_show which contains a multi-select array with a list of fields which should not be shown for that particular record.

Where and how in the loops do I put my code to check the contents of the do_not_show field to then be able to blank out the display of the particular field.

I am of a mind to put a piece of php code inside the record re-iteration to set a flag for each of the possible fields and then use these flags to determine wether the field content is shown or not. What I am not sure of is how to do the first part.

Malcolm


Viewing all articles
Browse latest Browse all 67836

Trending Articles