1
onionhead
Multiple column input with xoopsform class
  • 2005/12/29 20:14

  • onionhead

  • Just popping in

  • Posts: 5

  • Since: 2005/10/31


I am trying to create a module and I want to make sure I use the standard XOOPS tools. I am trying to do table like input using the xoopsform class. Basically, I want a header line, and then multiple lines below that where the users will enter data.

Something like this:

Project Date Open Date Clsd Status
---------- ------------ ---------- ------
text calendar calendar select
text calendar calendar select
text calendar calendar select
etc.

Where I am using formtext formcalendar and formselect for the input. I have downloaded a ton of modules and looked at the code, and I also looked at the code in the system module. None of the forms seem to do table like input.

I did some experimenting, and the closest I have been able to come is XoopsFormElementTray which lets you put multiple fields on one line. I might be able to make it sort of work. The problem is that I suspect it is the wrong method and I don't want the other kids to laugh at me--the other problem, of course, is that I don't get the column headings I need.

Can I do this?

2
Catzwolf
Re: Multiple column input with xoopsform class
  • 2005/12/29 20:49

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


You can't, will have to plain old html for this one.

3
onionhead
Re: Multiple column input with xoopsform class
  • 2005/12/29 21:54

  • onionhead

  • Just popping in

  • Posts: 5

  • Since: 2005/10/31


Thanks for the answer!

4
Dave_L
Re: Multiple column input with xoopsform class
  • 2005/12/29 22:33

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


You can do it by using the XoopsForm class in combination with a Smarty template.

The profile module in XOOPS 2.2.3a-final has an example.

Template:
modules/profile/termplates/profile_search.html

PHP file:
modules/profile/search.php

In the PHP file, this line makes the form fields accessible to the template:
$searchform->assign($xoopsTpl);

5
onionhead
Re: Multiple column input with xoopsform class
  • 2005/12/29 22:42

  • onionhead

  • Just popping in

  • Posts: 5

  • Since: 2005/10/31


Nice! Thanks for the reply. I just finished coding it the old-fashioned way (html), but first thing Monday morning I'll give the template/xoopsform method a try.

Login

Who's Online

185 user(s) are online (100 user(s) are browsing Support Forums)


Members: 0


Guests: 185


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