Forums

Custom Server Side Validation problem

ghostpaladin 03 Jan, 2012
Good afternoon.

I have a problem using the Custom Server Side Validation in chronoforms

the problem is that what I want to do is validate if the content of a text box exist on a table in the database that I'm using.

according to Custom Server Side Validation I can use PHP to do my query:

<?php
foreach($form->data['usuario'] as $detail){
if($detail['num_expediente']==$form->data[input])
return true;
foreach($form->data['usuario'] as $detail){
if($detail['num_serie']==$form->data[input_2])
return true;
}
return false;
?>


returning true if it finds the string on the database and false otherwise.
but it doesn't work. any idea why?
GreyHead 03 Jan, 2012
Hi ghostpaladin,

You need to drag an Event Loop action into the On Fail box of the Serverside validation action.

Bob
This topic is locked and no more replies can be posted.