Some Fields not Rendering
-
I’m trying to render a list of names/organizations of people who have signed a petition. For some reason, some of the fields from the database are rendering and some aren’t. The “organization” variable is displaying in plain text. There is also an “alum” variable that should be a class on the
- element.
I can’t figure out the mistake in my code. My site is live at mnacademics.seiudev.org/community-suppport. For demonstration purposes, I output all of my data from this form with [cfdb-datatable]. I’m then using [cfdb-html] to render the list. I’ve used this method on other lists and haven’t had problems.Here’s the PHP from the backend
<?php function community_list( $atts ){ ?> <ul class='community-list'> <?php echo do_shortcode('[cfdb-datatable form="Community Support"]'); echo do_shortcode( '[cfdb-html form="Community Support" show="first-name,last-name, organization, alum" orderby="Submitted desc"]' . '<li class="alum-${alum}"> ${first-name} ${last-name}, ${organization} </li>' . '[/cfdb-html]' ); ?> </ul> <?php } add_shortcode( 'community_list', 'community_list' ); ?>
- element.
- The topic ‘Some Fields not Rendering’ is closed to new replies.