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
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

Who's Online

128 user(s) are online (92 user(s) are browsing Support Forums)


Members: 0


Guests: 128


more...

Donat-O-Meter

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

Latest GitHub Commits