function regFormPTables($formData, $clsForm, $lNumTables, &$userTables) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- if ($lNumTables == 0) { return; } foreach ($userTables as $utable) { $lTableID = $utable->lKeyID; openBlock('Personalized Vol Table: <b>' . htmlspecialchars($utable->strUserTableName) . '</b>', ''); echoT('<table class="enpView" border="0">'); if ($utable->lNumFields == 0) { echoT('<i>No fields defined for this table.</i>'); } else { echoT(strCheckBoxHeaders(true)); foreach ($utable->fields as $field) { if ($field->enumFieldType != CS_FT_LOG) { $lFieldID = $field->pff_lKeyID; $enumFieldType = $field->enumFieldType; if ($enumFieldType == CS_FT_CHECKBOX || $enumFieldType == CS_FT_HEADING) { echoT(strFieldForReg(htmlspecialchars($field->pff_strFieldNameUser), $field->strFNShow, null, $field->bShow, null, true, ' ' . $field->strFieldTypeLabel, '', '')); } else { echoT(strFieldForReg(htmlspecialchars($field->pff_strFieldNameUser), $field->strFNShow, $field->strFNRequired, $field->bShow, $field->bRequired, true, ' ' . $field->strFieldTypeLabel, 'onChange="clearCheckOnUnCheck(document.frmVolReg.' . $field->strFNShow . ', document.frmVolReg.' . $field->strFNRequired . ');" ', 'onChange="setCheckOnCheck (document.frmVolReg.' . $field->strFNRequired . ', document.frmVolReg.' . $field->strFNShow . ');" ')); } } } } echoT('</table>'); closeBlock(); } }
function customFormPTables($formData, $clsForm, $lNumTables, &$userTables) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- if ($lNumTables == 0) { return; } $attributes = new stdClass(); $attributes->lTableWidth = null; $attributes->lMarginLeft = 0; $attributesClose = new stdClass(); $attributesClose->bCloseDiv = true; foreach ($userTables as $utable) { $lTableID = $utable->lKeyID; $attributes->divID = $strDivID = 'ut_' . $lTableID . 'Div'; $attributes->divImageID = 'ut_' . $lTableID . 'ImgDiv'; openBlock('Personalized Table: <b>' . htmlspecialchars($utable->strUserTableName) . '</b>', '', $attributes); echoT('<table class="enpView" border="0">'); if ($utable->lNumFields == 0) { echoT('<i>No fields defined for this table.</i>'); } else { echoT(' <i>To exclude this table from your form, uncheck all the boxes.</i><br> <input type="button" value="Check All" onclick="checkByParent(\'' . $strDivID . '\', true);"> <input type="button" value="Uncheck All" onclick="checkByParent(\'' . $strDivID . '\', false);"><br><br>'); echoT(strCheckBoxHeaders(true)); foreach ($utable->fields as $field) { if ($field->enumFieldType != CS_FT_LOG) { $lFieldID = $field->pff_lKeyID; $enumFieldType = $field->enumFieldType; if ($enumFieldType == CS_FT_CHECKBOX || $enumFieldType == CS_FT_HEADING) { echoT(strFieldForReg(htmlspecialchars($field->pff_strFieldNameUser), $field->strFNShow, null, $field->bShow, null, true, ' ' . $field->strFieldTypeLabel, '', '', $enumFieldType == CS_FT_HEADING)); } else { echoT(strFieldForReg(htmlspecialchars($field->pff_strFieldNameUser), $field->strFNShow, $field->strFNRequired, $field->bShow, $field->bRequired, true, ' ' . $field->strFieldTypeLabel, 'onChange="clearCheckOnUnCheck(document.frmVolReg.' . $field->strFNShow . ', document.frmVolReg.' . $field->strFNRequired . ');" ', 'onChange="setCheckOnCheck (document.frmVolReg.' . $field->strFNRequired . ', document.frmVolReg.' . $field->strFNShow . ');" ')); } } } } echoT('</table>'); closeBlock($attributesClose); echoT('<br> <!-- personalized table -->' . "\n"); } }