Is there any additional documentation for adding styles when registering ACF blocks? I can’t find anything in the ACF documentation, but I could be missing it.
I figured it out… for anyone that’s looking for the answer:
<?php
$terms = get_field('portfolio');
usort($terms, function($a, $b) {return strcmp($a->name, $b->name);});
if( $terms ):
echo '<ul>';
foreach( $terms as $term ):
echo '<li>';
$name = $term->name;
echo $name;
echo '</li>';
endforeach;
echo '</ul>';
endif;
?>
For future reference, this function is referred to here: https://www.advancedcustomfields.com/resources/acf-validate_save_post/
It will work if you use the selector within the input name. Should be something such as acf[field_5b1e124565677].
acf_add_validation_error( 'acf[field_5b1e124565677]', 'Required' );