Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Conditional display of fields using PHP code – if empty don't display

$
0
0

Hi.

I have a question similar to <a href="http://wp-types.com/forums/topic/conditionally-display-html-labels-for-fields-no-display-when-empty/">this one</a> but I am implementing the fields using php code.

This is what I have:

<dt class="productLabel"><?php echo __( 'Appellation:', 'formulawino' ); ?></dt><dd class="productDescription"><?php echo(types_render_field('fw_product_wine_appellation', array('class'=>''))); ?></dd>

and I would like to not to display the label if the field is empty. Would you be able to help me with this?

Thank you.


Viewing all articles
Browse latest Browse all 20145

Trending Articles