Skip Navigation

[Closed] How to get user to create table rows, remove them and leave no whitespace

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 10 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 -
- - - - - - -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 3 replies, has 2 voices.

Last updated by Adriano 10 years, 4 months ago.

Assisted by: Adriano.

Author
Posts
#172649

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;
	} 
#173157

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?

#173343

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.

#173715

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]

The topic ‘[Closed] How to get user to create table rows, remove them and leave no whitespace’ is closed to new replies.