JavaScript validation and form_for

Hi

I have a form I want to prevalidate with a JS function. This doesn’t
work…

<% form_for(:applicant,
            :condition => "checkCheckBoxes()",
            :url => { :action => "save_details" }) do |applicant| %>
                  ...
             <% end %>

:condition doesn’t have appear to have any effect unless I use
form_remote_for (is this right?)

What’s the best way to achieve what I want?

Thanks
Ashley