1
dinnolin
problem using XoopsFormDateTime
  • 2012/4/15 9:27

  • dinnolin

  • Just popping in

  • Posts: 2

  • Since: 2012/4/15


Hello everyone,

I had installed the latest xoops version:2.5.4
I am writing a module and use xoops-built Form object:XoopsFormDateTime

$form = new XoopsThemeForm("news", "edit", $_SERVER['PHP_SELF']);
$dateline = time();
$form->add Element(new XoopsFormDateTime("time", "dateline", 15, $dateline));

and I got the error output:
Fatal error: Call to a member function addScript() on a non-object in PATH:\xoops254\class\xoopsform\formtextdateselect.php on line 52

Where should I fix my code?
and how to replace the calendar icon [...] instead of others?
thank you.

2
zyspec
Re: problem using XoopsFormDateTime
  • 2012/4/16 17:35

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Need to include all the xoops form classes ... The easiest way is to use
le="color: #000000"><?php include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";


3
dinnolin
Re: problem using XoopsFormDateTime
  • 2012/4/18 5:47

  • dinnolin

  • Just popping in

  • Posts: 2

  • Since: 2012/4/15


Thank you for replying. But I already used this statement.
The other form objects such as XoopsFormText, XoopsFormEditor work fine,
only XoopsFormDateTime works strange...

Any other ideas? Thank you.

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!