Please see the code in this pastebin: http://pastebin.com/5gKwb7gi
It is quite a lot of code but I think all you gurus on here will understand it!
Basically what I have just confused myself is, I had a search form, and I then created an advanced search form which is dynamic.
I just got it finished and now I am attempting to include the simple search criteria (if it is filled out) in the advanced search query but obviously these variables are never set because the simple search form is never submitted :S
Does anyone have any hints, tips or ideas on what to do? Not sure if I want to combine the forms or not so I would appreciate some advice and opinions.
Thanks.
If anyone reads this question and would like to know how I solved it, I used hidden inputs and some JQuery to copy the values from the simple search form to the hidden inputs like so:
<input type="hidden" name="hiddenfilename" id="hiddenfilename"/>
<input type="hidden" name="hiddenfilesize_min" id="hiddenfilesize_min"/>
<input type="hidden" name="hiddenfilesize_max" id="hiddenfilesize_max"/>
//etc
<script type="text/javascript">
$("#filename").change(copyFilename);
$("#filesize_min").change(copyFileSizeMin);
$("#filesize_max").change(copyFileSizeMax);
function copyFilename()
{
var valueToCopy=$("#filename").val();
$("#hiddenfilename").val(valueToCopy);
}
function copyFileSizeMin()
{
var valueToCopy=$("#filesize_min").val();
$("#hiddenfilesize_min").val(valueToCopy);
}
function copyFileSizeMax()
{
var valueToCopy=$("#filesize_max").val();
$("#hiddenfilesize_max").val(valueToCopy);
}
</script>