可能かどうかはわかりませんが、テンプレート内のifステートメントを使用できますか?
したがって、電話番号に値がない場合は、その文をまったく表示したくありません...
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset="utf-8"/>
<title>{form_title}</title>
</head>
<body>
<p>You received the following message from {name} through the Gossip Cakes' contact form.</p>
<p>Their email is {email}</p>
<p>Their phone number is {phone}</p>
<p>The message: {message}</p>
</body>
</html>
ストレートphpを使用できると思いますが、ビューのhtmlを返す方法はありますか?