1
MS-2001
xoopsformloader
  • 2004/12/26 12:50

  • MS-2001

  • Quite a regular

  • Posts: 204

  • Since: 2004/7/27


Hi there,

I'm writing a new module for XOOPS but there's a problem. My module looks like that:

content (using a template)
form (using the xoopsformloader)

Displaying the Form with $form->display(); displays the form on top of my site:

form
header
content of module
footer

But it should be like that:

header
content of module (in use of template)
form (in use of xoopsformloader)
footer

is it possible?

2
Mithrandir
Re: xoopsformloader

Yes, but you will have to either not use a template and call $form->display(); OR (recommended) incorporate the form in the template by using $form->assign($xoopsTpl); and then modify the template to include this code to display the form:
<{$contactform.javascript}>
<
form name="<{$contactform.name}>" action="<{$contactform.action}>" method="<{$contactform.method}>" <{$contactform.extra}>>
  <
table class="outer" cellspacing="1">
    <
tr>
    <
th colspan="2"><{$contactform.title}>th>
    tr>
    
    <{foreach 
item=element from=$contactform.elements}>
      <{if 
$element.hidden != true}>
      <
tr>
        <
td class="head"><{$element.caption}>td>
        <
td class="<{cycle values="even,odd"}>"><{$element.body}>td>
      tr>
      <{else}>
      <{
$element.body}>
      <{/if}>
    <{/foreach}>
    
  table>
form>

Replace all occurrences of contactform with the name you give the form object

3
MS-2001
Re: xoopsformloader
  • 2004/12/26 13:06

  • MS-2001

  • Quite a regular

  • Posts: 204

  • Since: 2004/7/27


and again thx a lot Mithrandir

4
sgshell
Re: xoopsformloader
  • 2005/1/3 3:10

  • sgshell

  • Just popping in

  • Posts: 94

  • Since: 2004/10/4


How to arrange it without foreach?

I like to put the element, in the table arrange in custom way?

anyone know how to do it?

5
sgshell
Re: xoopsformloader
  • 2005/1/27 15:15

  • sgshell

  • Just popping in

  • Posts: 94

  • Since: 2004/10/4


no one know how ?

Login

Who's Online

311 user(s) are online (250 user(s) are browsing Support Forums)


Members: 0


Guests: 311


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