1
Peekay
Change WF-Downloads required field (description)
  • 2008/6/14 12:42

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I believe that a module can pass a fieldname to 'class/xoopsform/form.php' in order to make that field a 'required' field when the form is validated.

WF-Downloads makes the 'Description' field required, where I would prefer it not to be.

Can anyone tell me where to change that?. I seem to have searched through everything, but cannot spot the relevent function.

Any pointers would be appreciated
A thread is for life. Not just for Christmas.

2
Peekay
Re: Change WF-Downloads required field (description)
  • 2008/6/14 14:21

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


OK. Found it

wfdownloads/class/download.php

Lines 386 and 521 (approx)

Change 'true' to 'false' at the end of:

$sform->addElement(new XoopsFormDhtmlTextArea(_MD_WFD_DESCRIPTION'description'$this->getVar('description''e'), 1560"smartHiddenDescription"), true);


I really wanted to make the title a required field, but WF-Downloads has an option to use the uploaded filename as the title, which makes it a bit complicated.

If I figure out a way, I'll post it here.
A thread is for life. Not just for Christmas.

3
Peekay
Re: Change WF-Downloads required field (description)
  • 2008/6/15 12:31

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


If you want to remove the description field requirement for categories too, edit:

wfdownloads/class/category.php

line 116

Change 'true' to 'false' at the end of:

$sform -> addElement(new XoopsFormDhtmlTextArea(_AM_WFD_FCATEGORY_DESCRIPTION'description'$this->getVar('description''e'), 1560), true);
A thread is for life. Not just for Christmas.

Login

Who's Online

278 user(s) are online (153 user(s) are browsing Support Forums)


Members: 0


Guests: 278


more...

Donat-O-Meter

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

Latest GitHub Commits