Support

Home Forums Event Espresso Premium Exclude specific questions from confirmation page

Exclude specific questions from confirmation page

Posted: November 7, 2013 at 6:01 am


Stian Morsund

November 7, 2013 at 6:01 am

Hi!

I would like to exclude two questions from the order confirmation page. I don’t need the registrants to see that they’ve checked the terms and conditions checkbox from the registration form.
I’m guessing I have to do something to the question-foreach-loop in my confirmation_display.php template.

Please forgive my limited PHP knowledge ๐Ÿ™‚
Thanks


Stian Morsund

November 7, 2013 at 6:11 am

Nevermind, answer is here:

http://stackoverflow.com/questions/2304570/how-to-delete-object-from-array-inside-foreach-loop


Dean

November 7, 2013 at 6:22 am

Hi,

One way to do it would be to edit the confirmation_page.php at approx line 136, and stick in a foreach each to check the question name and if it is a match ignore it.

For example, this will ignore/remove the First Name and Last Name questions

<?php if ($display_questions != '') { ?>
		<div  id="additional-conf-info" class="additional-conf-info event-display-boxes">
				<h3 class="event_title ui-widget-header ui-corner-top"><?php echo stripslashes_deep($attendee_name)?></h3>
				<div id="additional-conf-info" class="additional-conf-info-inner event-data-display ui-widget-content ui-corner-bottom">
					<table id="event_espresso_attendee_verify_questions" class="event-display-tables grid">
					<?php foreach ($questions as $question) {
						echo $question->question;
						if($question->question === "First Name" || $question->question === "Last Name") { } else { ?>
						<tr>
							<th scope="row" class="header">
								<?php echo stripslashes( html_entity_decode( $question->question, ENT_QUOTES, 'UTF-8' )); ?>
							</th>
							<td>
								<span class="event_espresso_value"><?php echo stripslashes( html_entity_decode( $question->answer, ENT_QUOTES, 'UTF-8' )); ?></span>
							</td>
						</tr>
					<?php }} ?>
					</table>
				</div>
				<!-- / .event-data-display -->
			</div>
			<!-- / .event-display-boxes -->


Stian Morsund

November 7, 2013 at 6:24 am

Thank you ๐Ÿ™‚


Dean

November 8, 2013 at 1:46 am

No problem!

The support post ‘Exclude specific questions from confirmation page’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso