Note that there are some explanatory texts on larger screens.

plurals
  1. POIn PHP how do I hide unanswered fields?
    text
    copied!<p>I am creating a very long form and not all fields will be answered, how can I hide unanswered fields after they hit the send button and I receive the email?</p> <p>So what I'm wondering is what can I add to my script to hide a blank field after the submit button is sent.</p> <pre><code> /* Data Variables */ $email = $_POST['email']; $name = $_POST['name']; $phone = $_POST['phone']; $uplift = $_POST['uplift']; $upliftc = $_POST['upliftc']; $city = $_POST['city']; $post = $_POST['post']; $delivery = $_POST['delivery']; $deliveryc = $_POST['deliveryc']; $city2 = $_POST['city2']; $post2 = $_POST['post2']; $ground = $_POST['ground']; $second = $_POST['second']; $second2 = $_POST['second2']; $ground2 = $_POST['ground2']; $internal =$_POST['internal']; $internal2 =$_POST['internal2']; $external =$_POST['external']; $external2 =$_POST['external2']; $access =$_POST['access']; $queen = $_POST['queen'] * 1.7; $body = &lt;&lt;&lt;EOD &lt;br&gt;&lt;hr&gt;&lt;br&gt; Name: $name &lt;br&gt; Email: $email &lt;br&gt; Phone; $phone &lt;br&gt; &lt;br&gt; Uplift; $uplift &lt;br&gt; Continued; $upliftc &lt;br&gt; City; $city &lt;br&gt; Post Code; $post &lt;br&gt; &lt;br&gt; Delivery Address; $delivery &lt;br&gt; Continued; $deliveryc &lt;br&gt; City; $city2 &lt;br&gt; Post; $post2 &lt;br&gt; &lt;br&gt; Uplift; &lt;br&gt; Ground Floor; $ground &lt;br&gt; Second Floor; $second &lt;br&gt; Internal Stairs; $internal &lt;br&gt; External Stairs; $external &lt;br&gt; &lt;br&gt; Delivery; &lt;br&gt; Ground Floor; $ground2 &lt;br&gt; Second Floor; $second2 &lt;br&gt; Internal Stairs; $internal2 &lt;br&gt; External Stairs; $external2 &lt;br&gt; Truck Access; $access &lt;br&gt; Queen Bed; $queen &lt;br&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload