ice78991
Programmer
- Nov 20, 2006
- 216
<form action="example.cfm" method="get">
<input type="text" name="input1" value="">
<input type="text" name="input2" value="">
<input type="hidden" name="hidden" value="">
<cfinput type="submit" name="sub" value="Submit">
</form>
If you submit empty fields in the above form then they are included in the URL as follows
input1=&input2=&hidden=
Is there any way to force the browser to only add variables to the URL if they have a value?
<input type="text" name="input1" value="">
<input type="text" name="input2" value="">
<input type="hidden" name="hidden" value="">
<cfinput type="submit" name="sub" value="Submit">
</form>
If you submit empty fields in the above form then they are included in the URL as follows
input1=&input2=&hidden=
Is there any way to force the browser to only add variables to the URL if they have a value?