fieldtype = ['TEXT' => '']; $this->defaulttype = 'TEXT'; } /** * 字段相关属性参数 * * @param array $value 值 * @return string */ public function option($option) { $html = ''; $max = dr_count($option['field'])+5; for ($i = 1; $i <= $max; $i++) { $html.= '
'.dr_lang('列名称:是表格列的显示名称').'
'.dr_lang('列宽度:是表格列的宽度,[整数]表示固定宽度;[整数%]表示百分比').'
'.dr_lang('选择项:仅用于下拉选择框和复选框的选项,多个选项用半角,分开').'
'.dr_lang('行名称:是表格每一行的显示名称,如果不填就按照默认行名称显示,如果默认行名称也没有填写就不显示行名').'
'.dr_lang('了解此字段的使用方法').'| '.dr_lang($field['setting']['option']['first_cname']).' | '; } if ($field['setting']['option']['field']) { foreach ($field['setting']['option']['field'] as $t) { if ($t['type']) { $style = $t['width'] ? 'style="width:'.$t['width'].(is_numeric($t['width']) ? 'px' : '').';"' : ''; $str.= ''.dr_lang($t['name']).' | '; } } } if ($field['setting']['option']['is_add']) { $str.= ''; $str.= ''; $str.' | '; } $str.= '
|---|---|---|
| '.$this->_field_type_html($t, $name, $value, '{hang}', $n, $field).' | '; } } } $tpl.= ''; $tpl.= ' | |
| '.$this->_field_type_html($t, $name, $value, $hang, $n, $field).' | '; } } } $str.= ''; $str.= ' | |
| '.($field['setting']['option']['hang'][$i]['name'] ? $field['setting']['option']['hang'][$i]['name'] : '未命名').' | '; } if ($field['setting']['option']['field']) { foreach ($field['setting']['option']['field'] as $n => $t) { if ($t['type']) { $str.= ''.$this->_field_type_html($t, $name, $value, $i, $n, $field).' | '; } } } $str.= '
| ' . dr_lang($field['setting']['option']['first_cname']) . ' | '; } if ($field['setting']['option']['field']) { foreach ($field['setting']['option']['field'] as $t) { if ($t['type']) { $style = $t['width'] ? 'style="width:'.$t['width'].(is_numeric($t['width']) ? 'px' : '').';"' : ''; $str.= ''.dr_lang($t['name']).' | '; } } } $str.= '
|---|---|
| ' . $hname . ' | '; } if ($field['setting']['option']['field']) { foreach ($field['setting']['option']['field'] as $n => $t) { if ($t['type']) { $td = $val[$n]; if ($td && $t['type'] == 3) { // 图片 $td = ''.$td.' | '; } } } $i++; $str.= '