public static function renderFormFileds($bind_type, $object, $sf_user, $extra_fields = null) { if ($extra_fields === null) { $extra_fields = ExtraFieldsList::getFieldsByType($bind_type, $sf_user); } if ($bind_type == 'events') { $values = ExtraFieldsList::getValuesList($extra_fields, $object ? $object->getEventId() : false); } else { $values = ExtraFieldsList::getValuesList($extra_fields, $object ? $object->getId() : false); } $html = ''; foreach ($extra_fields as $v) { if ($v['type'] == 'formula') { continue; } $html .= ' <tr id="extra_field_row_' . $v['id'] . '" class="extra_field_row"> <th>' . $v['name'] . ($v['type'] == 'checkbox' ? '<br><a href="#" onClick="return checkAllInContainer(\'checkboxesList' . $v['id'] . '\')"><small>' . __('Select All') . '</small></a>' : '') . '</th> <td>' . ExtraFieldsList::renderFormFieldByType($v, $values) . '</td> </tr>'; } return $html; }