CRM-15153 - Give forms a unique css class based on full class name
[civicrm-core.git] / templates / CRM / Form / validate.tpl
index 852a2b7c2177c1d36df049b16b3625a12c69dc32..117867892ff2fba4a191818ca1b8650719862bf7 100644 (file)
 *}
 {* Initialize jQuery validate on a form *}
 {* Extra params and functions may be added to the CRM.validate object before this template is loaded *}
-{if !$crm_form_validate_included and $smarty.get.snippet neq 'json' and $form and $form.formName}
+{if !$crm_form_validate_included and $smarty.get.snippet neq 'json' and $form and $form.formClass}
   {assign var=crm_form_validate_included value=1}
   {literal}
   <script type="text/javascript">
     CRM.$(function($) {
-      $("#{/literal}{$form.formName}{literal}").crmValidate();
+      $("form.{/literal}{$form.formClass}{literal}").crmValidate();
     });
   </script>
   {/literal}