1
Hi to all,
i've make a little form with custom template but element XoopsFormDateTime it doesn't display, while anothers components yes.
My XOOPS version is 2.0.16.
My code (include/form_edit.inc.php):
include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
$edit_form = new XoopsThemeForm("Edit", "edit_form", "edit.php");
$descrizione = new XoopsFormTextArea("Descrizione", "descrizione",$eo_descr,10,100,"desc");
$edit_form->addElement($descrizione,true);
echo xoops_getUserTimestamp($eo_ins_date);
$data = new XoopsFormDateTime("Data","data", 15,0 /*$eo_ins_date*/);
$edit_form->addElement($data,false);
$note = new XoopsFormTextArea("Note", "note",$eo_note,10,100,"note");
$edit_form->addElement($note,true);
$edit_form->addElement(new XoopsFormHidden('id', $id));
$button_tray = new XoopsFormElementTray(' ' ,' ', 'button');
$button_tray->addElement(new XoopsFormButton('','post',"Modifica",'submit'));
$edit_form->addElement($button_tray);
Template:
<div align="center"><font color="#FF0000"><strong>test</strong> </font></div>
<form name="<{$edit_form.name}>" action="<{$edit_form.action}>" method="<{$edit_form.method}>">
<table cellpadding="0" cellspacing="1" width="98%" border="1" class="outer">
<tr>
<th align="center" colspan="2"><{$edit_form.title}></td>
</tr>
<tr>
<td class="head" width="8%"><{$edit_form.elements.descrizione.caption}>:</td>
<td class="even"><{$edit_form.elements.descrizione.body}></td>
</tr>
<tr>
<td class="head" width="8%"><{$edit_form.elements.data.caption}>:</td>
<td class="even"><{$edit_form.elements.data.body}></td>
</tr>
<tr>
<td class="head" width="8%"><{$edit_form.elements.note.caption}>:</td>
<td class="even"><{$edit_form.elements.note.body}></td>
</tr>
<tr>
<td class="head" ><{$edit_form.elements.button.caption}></td>
<td class="<{cycle values="even,odd"}>"><{$edit_form.elements.button.body}></td>
</tr>
</table>
<br />
<{$edit_form.elements.id.body}>
</form>
<div style="margin-right:auto;margin-left:50%;"><input type="submit" value="indietro" onclick="history.go(-1);" /></div>
Anyone have some problem?
Thanks in adv,
DaGoN