Scoring in admin notification email

I have a risk assessment form for a client here…

Each question includes a multiple choice answer using radio buttons. There are only three options per question. The first choice is always worth one point. The second is two points and the third is worth three points.

After completing the form, points are added up to generate a total risk score. Here’s an example of a results page…

What I want to do is include that score in the admin notification email. Since we calculate and display the score on the last page, this score isn’t accessible to the admin email.

I don’t even need the calculated score - even identifying whether option 1, 2, or 3 was chosen for each question would be enough.

Anybody know how this might be done?

Another option would be adding the results page URL to the admin email. Is this possible?

Can you use a number field in the form, using the built in calculations, to total up all the radio button selections? That number would be stored in the entry and would then be available in your notifications via a merge tag.

Chris, thanks for your input.

I had another developer help me out with this. That solution is shown below in case anyone else is interested.

* Add risk assessment results shortcode for admins.

function shortcode_risk_assessment_results_admin( $atts ) {
	$a = shortcode_atts([
		'id' => null,
	], $atts );

	$id = $a['id'];

	if ( $id === null ) {
		$id = filter_var( $_GET['id'], FILTER_VALIDATE_INT );

	$search = [];
	$search['field_filters'][] = [ 'key' => '17', 'value' => $id ]; // key is uuid field id
	$entry = GFAPI::get_entries( 0, $search );
	$entry = $entry[0];
	$risk = 0;
	for ( $i = 1; $i <= 10; $i+=1 ) {
		$risk+= $entry[ $i ];

	$risk_level = 'low';

	if ( $risk >= 11 ) {
		$risk_level = 'moderate';

	if ($risk >= 21) {
		$risk_level = 'high';


<table width="100%" border="0" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">
		<tr bgcolor="#EAF2FA">
			<td colspan="2">
				<font style="font-family: sans-serif; font-size:12px;"><strong>User Risk Level</strong></font>
		<tr bgcolor="#FFFFFF">
			<td width="20">&nbsp;</td>
			<td><font style="font-family: sans-serif; font-size:12px;"><?php echo esc_html( $risk_level ); ?></font></td>
		<tr bgcolor="#EAF2FA">
			<td colspan="2"><font style="font-family: sans-serif; font-size:12px;"><strong>User Score</strong></font></td>
		<tr bgcolor="#FFFFFF">
			<td width="20">&nbsp;</td>
			<td><font style="font-family: sans-serif; font-size:12px;"><?php echo esc_html( $risk ); ?> / 30</font></td>


	return ob_get_clean();

	add_shortcode( 'risk-assessment-results-admin', 'gdca_shortcode_risk_assessment_results_admin' );

Very cool. Thanks for posting the solution.