:javascript $(function(){ $('.contact_form').validate(); }); %p %h3= model.title - if(flash['error']) .error= flash('error') %form{ :class => 'contact_form', :id => 'contact_form_'+model.id.to_s, :action => route_to(:contactforms, :mailer, model.id), :method => 'POST' } %p %label{ :for => 'contact_from'} Your Name %br %input{ :type => 'text', :class => 'required', :minlength => '4', :maxlength => '80', :id => 'contact_from', :name => 'contact_from' } %div.contact_phone %label{ :for => 'contact_from'} Your Phone %input{ :type => 'text', :class => '', :id => 'contact_phone', :name => 'contact_phone', :value => '' } %p %label{ :for => 'contact_email_address'} Your E-mail %br %input{ :type => 'text', :class => 'email required', :id => 'contact_email_address', :name => 'contact_email_address' } %input{ :type => 'hidden', :id => 'r', :name => 'r', :value => packet['route.return_path'] } %p %label{ :for => 'contact_message'} Message %br %textarea{ :class =>'required', :id => 'contact_message', :name => 'contact_message', :minlength => '6', :maxlength => '3000' }= " " %input{ :type => 'submit', :value => 'Submit' }