Not sure exactly how to go about this

Let’s just say that if any data is entered into date_from1 then everything else becomes required, otherwise ignore this section… I’m stumped and not sure which language to use, PHP, or Jquery/Javascript been at this for a week with no solution in sight…what do i do? :-/ The webpage is running in php and the form is done in html.

<div data-row-span="8">
<div data-field-span="1">
<label for="date_From1">From</label>
<input name="date_From1" type="text">
</div>

<div data-field-span="1">
<label for="date_To1">To</label>
<input name="date_To1" type="text">
</div>

<div data-field-span="2">
<label for="address_Ph1">address</label>
<input name="address_Ph1" type="text">
</div>

<div data-field-span="1">
<label for="info_set1">Set 1
<input name="info_set1"type="text">
</div>

<div data-field-span="1">
<label for="info_set2">Set 2</label>
<input name="info_set2"type="text">
</div>

<div data-field-span="2">
<label for="info_set3">Set 3</label>
<input name="info_set3"type="text">
</div>
</div>

You are on the right track – it requires all the above – client-side (JavaScript) and server-side (PHP).

This is a drastic simplification of things…

With JavaScript you would show and hide the fields when info is added to the dependent (date_From1) field.
With PHP you would then verify that the required data exists when info for date_From1 has been provided. Otherwise, you would just ignore the other fields.

You need both because PHP is used to guarantee the integrity of data. Where as JavaScript is merely a UI improvement that can easily be turned off.

I’m really stumped, but this is what I theoretically have so far…

<?php

<div data-row-span="8">
<div data-field-span="1">
<label for="date_From1">From</label>
<input name="date_From1" type="text">
</div>

<div data-field-span="1">
<label for="date_To1">To</label>
<input name="date_To1" type="text">
</div>

<div data-field-span="2">
<label for="address_Ph1">address</label>
<input name="address_Ph1" type="text">
</div>

<div data-field-span="1">
<label for="info_set1">Set 1
<input name="info_set1"type="text">
</div>

<div data-field-span="1">
<label for="info_set2">Set 2</label>
<input name="info_set2"type="text">
</div>

<div data-field-span="2">
<label for="info_set3">Set 3</label>
<input name="info_set3"type="text">
</div>
</div>
?>

validation.php script plan
If date_From1 is empty, ignore it, otherwise the data in info_set2 must exist, if 
the data in info_set2 does not exist, the script must stop and display an alert and the 
focus must rever to that box that needs data.

<?php
//everything above will be removed befor installing in the form validation script

if ($_SERVER["REQUEST_METHOD"] == "POST") {
$date_From = $_POST["date_From1"]
}

if (empty($date_From)){
echo "Date must have Data";

} else {
// This is where the captcha validation proceeds and if it passes, the rest of the form validation and email code runs.


}

// Everything below this part will be removed and placed in the right area of the form
?>