" />

This page is a sample of page using tables. It is designed to make test with

- css (add parameter &theme=newtheme to test another theme or edit css of current theme)
- jmobile (add parameter ">dol_use_jmobile=1&dol_optimize_smallscreen=1 and switch to small screen < 570 to enable with emulated jmobile)
- no javascript / usage for bind people (add parameter ">nojs=1 to force disable javascript)
- tablednd



Example 0a : Table with div+div+div containing a select that should be overflowed and truncated => Use this to align text or form



Example 0b: Table with div+form+div containing a select that should be overflowed and truncated => Use this to align text or form



Example 0c: Table with table+tr+td containing a select that should be overflowed and truncated => Use this to align text or form



Example 1 : Standard table/thead/tbody/tr/th-td (no class pair/impair on td) => Use this if you need the drag and drop for lines or for long result tables
initAsSpecimen(); $object = $productspecimen; $sortfield = 'aaa'; $sortorder = 'ASC'; $tasksarray = array(1, 2, 3); // To force having several lines $tagidfortablednd = 'tablelines3'; if (!isset($moreforfilter)) { $moreforfilter = ''; } if (!empty($conf->use_javascript_ajax)) { include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; } $nav = ''; $nav .= '
'; if ($actioncode || GETPOSTISSET('actioncode')) { $nav .= ''; } if ($status || GETPOSTISSET('status')) { $nav .= ''; } if ($filter) { $nav .= ''; } if ($filtert) { $nav .= ''; } if ($socid) { $nav .= ''; } if (isset($showbirthday) && $showbirthday) { $nav .= ''; } if (isset($pid) && $pid) { $nav .= ''; } if ($type) { $nav .= ''; } if ($usergroup) { $nav .= ''; } $nav .= $form->selectDate($dateselect ?? '', 'dateselect', 0, 0, 1, '', 1, 0); $nav .= ' '; $nav .= '
'; $limit = 10; print_barre_liste('Title of my list', 12, $_SERVER["PHP_SELF"], '', '', '', 'Text in middle', 20, 500, '', 0, $nav, '', $limit, 0, 0, 1); $moreforfilter .= '
'; $moreforfilter .= $langs->trans('This is a select list for a filter A (no combo forced)').': '; $cate_arbo = array('field1' => 'value1a into the select list A', 'field2' => 'value2a'); $moreforfilter .= $form->selectarray('search_aaa', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidth300', 0); // List with no js combo $moreforfilter .= '
'; $moreforfilter .= '
'; $moreforfilter .= $langs->trans('This is a select list for a filter B (auto combo)').': '; $cate_arbo = array('field1' => 'value1b into the select list B', 'field2' => 'value2b'); $moreforfilter .= $form->selectarray('search_bbb', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidth300', -1); // List with js combo auto $moreforfilter .= '
'; $moreforfilter .= '
'; $moreforfilter .= $langs->trans('This is a select list for a filter C (combo forced)').': '; $cate_arbo = array('field1' => 'value1c into the select list C', 'field2' => 'value2c'); $moreforfilter .= $form->selectarray('search_ccc', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidth300', 1); // List with js combo forced $moreforfilter .= '
'; $moreforfilter .= '
'; $moreforfilter .= $langs->trans('This is a select list for a filter D (combo forced)').': '; $cate_arbo = array('field1' => 'value1d into the select list D', 'field2' => 'value2d'); $moreforfilter .= $form->selectarray('search_ddd', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidth300', 1); // List with js combo forced $moreforfilter .= '
'; if (!empty($moreforfilter)) { print '
'; print $moreforfilter; $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
'; } ?> " id="tablelines3"> trans('title1'), 0, $_SERVER["PHP_SELF"], 'aaa', '', '', 'align="left"', $sortfield, $sortorder); ?> trans('title2'), 0, $_SERVER["PHP_SELF"], 'bbb', '', '', 'align="center"', $sortfield, $sortorder); ?> trans('title3'), 0, $_SERVER["PHP_SELF"], 'ccc', '', '', 'align="right"', $sortfield, $sortorder); ?>
getNomUrl(1); ?>b1c1
a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2b2c2
a3b3c3




Example 2 : Table using tags: div.tagtable+(div|form).tagtr+div[.tagtd] => Use this for tables that need to have a different form for each line, but AVOID IT if possible (drag and drop of lines does not work for this case, also height of title can't be forced to a minimum)

use_javascript_ajax)) { include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; } ?>
Title A
title B
title C
title D
line4
dfsdf
bbbb
line5
dfsdf
bbbb
line6
jghjgh
5
lll