Jquery Validation 2 forms
<p>I'm running into a problem with jquery.validate. I have 2 forms on 1 page. the first form is an image upload. which ajax hijacks the post of, uploads the image and returns the image to the screen then updates a hidden input(vLogo) in the second form with the image name. </p>

<p>What I would like to do is if the hidden input is empty have the element from the first form highlighted as required when the 2nd form is validated. I hope that makes sense. Hopefully somebody can help me out.
Here is an example of the forms:</p>

<p>FORM 1 - image upload form</p>

<pre><code>&lt;form class="logoform" id="mLogo"&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;div id="logoContainer"&gt;
                &lt;span id="logoarea"&gt; &lt;img id="thumb" width="100px" height="100px" src="images/logo_placeholder.gif" border="0"&gt;&lt;/span&gt;
            &lt;/div&gt;
        &lt;/td&gt;
        &lt;td colspan=2&gt;
            &lt;table cellspacing=0 cellpadding=3 border=0&gt;
                &lt;tr&gt;
                    &lt;td class="field"&gt;&lt;input type="file" name="upload1" id="upload1" class="required"&gt;&lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt; 
                    &lt;td align="right"&gt;&lt;input type="submit" value="Add Logo" name="addlogo" class="ui-button ui-button-text-only ui-widget ui-state-default ui-corner-all"&gt;&lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td class="flabel"&gt;&lt;label for="volvoLogo"&gt;Logo Upload&lt;/label&gt;&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt; 
        &lt;/td&gt;
    &lt;/tr&gt;           
&lt;/form&gt;
</code></pre>

<p>FORM 2 Data Collection</p>

<pre><code>&lt;form id="customcal" action="processCal.cfm" method="post"&gt;
    &lt;tr&gt;
        &lt;td colspan=3 class="flabel"&gt;&lt;label for="c_dealerName"&gt;Dealer Name&lt;/label&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td colspan=3 class="field"&gt;&lt;input type="text" name="c_dealerName" class="required"&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td class="flabel"&gt;&lt;label for="c_phone"&gt;Phone&lt;/label&gt;&lt;/td&gt;
        &lt;td colspan=2 class="flabel"&gt;&lt;label for="c_fax"&gt;Fax&lt;/label&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td class="field"&gt;&lt;input type="text" name="c_phone" class="required phone"&gt;&lt;/td&gt;
        &lt;td class="field" colspan=2&gt;&lt;input type="text" name="c_fax" class="required phone"&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td colspan=3 class="flabel"&gt;&lt;label for="c_website"&gt;Website Address&lt;/label&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td colspan=3 class="field"&gt;&lt;input type="text" name="c_website" class="required"&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;input type="hidden" name="vLogo" id="vLogo" class="required"&gt;
    &lt;tr&gt; 
        &lt;td colspan=3 align="right"&gt;&lt;input type="submit" value="Submit" id="subform" name="submit" class="ui-button ui-button-text-only ui-widget ui-state-default ui-corner-all"&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/form&gt;
</code></pre>

<p>JQUERY VALIDATION THUS FAR</p>

<pre><code>$("#customcal").validate({
    invalidHandler: function(e, validator) {
        var errors = validator.numberOfInvalids();

        if (errors) {
            var message = errors == 1
                ? 'You missed 1 field. It has been highlighted below'
                : 'You missed ' + errors + ' fields.  They have been highlighted below';
            $("div.error span").html(message);
            $("div.error").show();
        } else {
            $("div.error").hide();
        }
    },
    onkeyup: false,     
    submitHandler: function() {         
        $("div.error").hide();                  
        form.submit();      
    }
});
</code></pre>
