Fixed a bug

Questions and bug reports for current release of CKForms

Fixed a bug

Postby andyw » Mon Nov 01, 2010 8:41 am

I started using CKForms today, and it's great! I did find 1 bug in the validation of number fields. When I specified a min and max LENGTH, it was validating the min and max VALUES. I found the code that was doing that and rewrote it for you. It's in views\ckforms\tmpl\default.php, starting at line 196. Here is the new code:

if ($min != '0' || $max != '-1')
{
if ($field->typefield == 'text' && $field->t_texttype == 'number')
{
$validationclass = $validationclass."'number',";
}
$validationclass = $validationclass."'length[".$min.",".$max."]',";
}

Regards,
Andy
andyw
 
Posts: 1
Joined: Mon Nov 01, 2010 7:52 am
Top

Return to CKForms 1.3.x Support forum

Who is online

Users browsing this forum: No registered users and 0 guests