isValid()) { $info=array('name'=>$thisclient->getName(), 'email'=>$thisclient->getEmail(), 'phone'=>$thisclient->getPhoneNumber()); } $info=($_POST && $errors)?Format::htmlchars($_POST):$info; $form = null; if (!$info['topicId']) { if (array_key_exists('topicId',$_GET) && preg_match('/^\d+$/',$_GET['topicId']) && Topic::lookup($_GET['topicId'])) $info['topicId'] = intval($_GET['topicId']); else $info['topicId'] = $cfg->getDefaultTopicId(); } $forms = array(); if ($info['topicId'] && ($topic=Topic::lookup($info['topicId']))) { foreach ($topic->getForms() as $F) { if (!$F->hasAnyVisibleFields()) continue; if ($_POST) { $F = $F->instanciate(); $F->isValidForClient(); } $forms[] = $F->getForm(); } } ?>