Forums

simple validation issue

glens1234 09 Aug, 2013
Hi. Can you help me please? i am trying to do this...


<?php
$rp = $form->data['request_pickup'];
$hos = $form->data['hotel_on_samui'];
if ( ($rp == "Yes") && ($hos == "" ) 
{
  $form->validation_errors['data'] = "If you wish to be picked up, please enter the name of your hotel.";
  return false;
}
?>



<input maxlength="150" size="30" title="" type="text" value="" name="hotel_on_samui">
<input value="Yes" title="" type="checkbox" name="request_pickup">


..but it doesn't work. No message is displayed.

I have added an event loop.
I have almost 0 experience with PHP.
Can you see anything obviously wrong with this?

Thanks
GreyHead 09 Aug, 2013
Hi glens1234,

That code looks OK.

Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here.

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