"needed" can be used as alternative to "required" to workaround Opera bug.

Relevant Field or Groups of Fields

Relevant fields

Number of years at current address?Number of years at previous address?

Here is the markup for the above form:

<form name="form8" onsubmit="false">
<fieldset>
<legend>Relevant fields</legend>
<label title="try with 5 and then with 3"
for="f1">Number of years at current address?</label>
<input id="f1" name="x" type="number"/><br/>
<label title="Needed if years at current address is less than 4"
for="f2">Number of years at previous address?</label>
<input id="f2" name="y" type="number" relevant="x < 4"/>
</fieldset>
</form>