Essentially I am trying to create a table with rows like hidden link. I'd like the user to be able to change: rank #, team name, record, change #, add comments, and have all that be inside a div with css declarations, but it would be done 32 times.
I'm running into trouble figured out how to accomplish this. What I need to consider is that if the user decides to only create 16 rows instead of 32, then there won't be any whitespace due to 16 extra divs that aren't filled with content.
This is what I have, and it creates whitespace for the divs that don't have any of the custom types fields filled out because I have margin & padding out the parent div (.pick)
<div class="pick"><!-- GAME 14 -->
<div class="pick-teams"><?php echo(types_render_field("ateam14", array())); ?> <span class="pick-rec"><?php echo(types_render_field("arec14", array())); ?></span><span class="at-symbol"> <?php echo(types_render_field("atsym14", array())); ?></span> <?php echo(types_render_field("hteam14", array())); ?> <span class="pick-rec"><?php echo(types_render_field("hrec14", array())); ?></span></div>
<div class="pick-txt"><?php echo(types_render_field("match14", array())); ?></div>
<div class="pick-winner"><?php echo(types_render_field("win14", array())); ?></div>
</div>
.pick {
margin: 20px 0 30px;
padding: 0 10px;
}
Dear Vytenis,
There is an option in Views settings which let you to configure the Limit of items will be shown, in this case you can set a number like 32. Do you know this feature? If it doesn't solve your issue, can you explain with more details?
The thing is I'd have to hide the whole parent div, which has margin & padding declarations, if none of the types fields had any content in them.
I'm using a different plugin now that does what I'm looking for, but I'm still curious.
Dear Vytenis,
Please take a look here: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
You could hide using wpv-if like:
[wpv-if completed="wpcf-completed" evaluate="empty($completed)"]
Show if compled is empty
[/wpv-if]