Table template

trivoc

New Member
Hi, i've 2 Groups and 2 forms (Group A in Form A, and Group B in form B). I want to display the 2 forms in one single table, but my html template doesn't work:
- if i create the table from the form A, only the elements of the Group A are displayed, even if the html template contains ellements from both groups/forms
- if i create the table from the form B, only the elements of the Group B are displayed, even if the html template contains ellements from both groups/forms

You can see below the code of my html template, wich was actually wrote by Rob as an example for Mosforms. Can someone tell me what if there ir something wrong in it?


Code:
<mos:comment>
@version 4.5.2
@package mosforms
@copyright (C) 2005 Rob Clayburn
@license [url]http://www.gnu.org/copyleft/gpl.html[/url] GNU/GPL
</mos:comment>
<mos:var name="fabrik_templatevars" />

<form action="index.php" method="post" name="mosformtable" id="mosformtable">
 <div align="center"> 
  <table width="100%" height="3%" align="center">
   <tr>
    <td width="85%" height="100%">
     <div align="left">
      <table width="81%" align="center" cellspacing="10">

       <tr>
        <td width="100%" height="38" colspan="2">
         <h1 align="center"> {LABEL}</h1></td>
       </tr>
      </table>
     </div>
     <table width="59%" height="16%" align="center">
      <tr>

       <td width="92%" height="45">
        <div align="left"></div>
        <table width="44%" align="center" cellspacing="5" class="filtertable">
         <mos:tmpl name="filters">
       <td width="83%">
         <div align="left"><strong>{NAME}</strong></div>
         <td width="17%">
          <div align="left">{VALUE}</div></td>

         </mos:tmpl>
        </table>
       <th width="8%" valign="middle"><div align="left">
         <input type="button" onClick="submitMosformTable('filter')" class="button" value="Buscar" name="filter2" />
        </div>
      </tr>
     </table>
   </tr>
   <tr>

    <td height="100%">   
   </tr>
  </table>
 </div>
 <p align="center"> {INTRODUCTION}<mos:tmpl name="row-show" type="simplecondition" requiredvars="rowcount=1"></mos:tmpl><mos:tmpl name="hidden-fields">
  <input type="hidden" id="{NAME}" name="{NAME}" value="{VALUE}" />
 </mos:tmpl> </p>
 <div style="clear:both;">

  <table width="87%" height="4%" align="center" cellspacing="4" bordercolor="#0000FF">
   <tr bordercolor="#00FFFF" bgcolor="#666666">
    <th width="210"><div align="center"><strong><font color="#FFFFFF" size="2">Portada</font></strong></div></th>
    <th width="241"><div align="center"><strong><font color="#FFFFFF" size="2">Contraportada</font></strong></div></th>
    <th width="205"><div align="center"><strong><font color="#FFFFFF" size="2">Canci&oacute;n</font></strong></div></th> 
    <th width="161">
     <center>

      <strong><font color="#FFFFFF" size="2">Letra</font></strong>
    </center></th>
    <th width="150"> <center>
      <strong><font color="#FFFFFF" size="2">MP3</font></strong>
    </center></th>
   </tr>
   <mos:tmpl name="named-rows"> 
   <!-- this part of the template repeats each row of the table-->

   <tr>
    <td bgcolor="#FFFFFF"><div align="center"><font size="1">{JOS_FABRIK_FORMDATA_1.PORTADA}</font></div></td>
    <td bgcolor="#FFFFFF"><div align="center"><font size="1">{JOS_FABRIK_FORMDATA_1.CONTRAPORTADA}</font></div></td>
    <td bgcolor="#FFFFFF"><div align="center"><font size="1">{JOS_FABRIK_FORMDATA_2.TITULO}</font></div></td> 
    <td bgcolor="#FFFFFF">
     <div align="center"><font size="1">{JOS_FABRIK_FORMDATA_2.LETRA}</font></div></td>
    <td height="19" bgcolor="#FFFFFF"> <div align="center"><font size="1">{JOS_FABRIK_FORMDATA_2.MP3}</font></div></td>

   </tr>
   </mos:tmpl> 
  </table>
  <p align="center">{MOSFORM_DELETEBUTTON} {MOSFORM_PAGENAV}</p>
 </div>
</form>

Thanks...
 
Hi Victor,

Have you tried adding both the A & B groups to the same form i.e. "Form A".

Select “Components?Fabrik?Forms?? from the top menu in your Joomla administration panel, edit "Form A", select the "form Groups" tab, select "Group B" from the "Avaiable Groups" list and press the "Add" button.

Now in the "Current Groups" list you should see both "Group A" & "Group B". Save the edit and check your form in the front end.

I hope this helps,
-Graylan King
 
hi

the table template structure has changed somewhat - use this structure instead:

Code:
<mos:comment>
@version 4.5.2
@package mosforms
@copyright (C) 2005 Rob Clayburn
@license [url]http://www.gnu.org/copyleft/gpl.html[/url] GNU/GPL
</mos:comment>



 <mos:tmpl name="named-groups" type="condition" conditionvar="rowcount">
		<mos:sub condition="0">
			{EMPTY_DATA_MSG}
		</mos:sub>
		<mos:sub condition="__default">
			<table>
 				<tr bordercolor="#00FFFF" bgcolor="#666666">
    				<th width="210"><div align="center"><strong><font color="#FFFFFF" size="2">Portada</font></strong></div></th>
    				<th width="241"><div align="center"><strong><font color="#FFFFFF" size="2">Contraportada</font></strong></div></th>
    				<th width="205"><div align="center"><strong><font color="#FFFFFF" size="2">Canci&oacute;n</font></strong></div></th> 
    				<th width="161">
     				<center>
      				<strong><font color="#FFFFFF" size="2">Letra</font></strong>
    				</center></th>
    				<th width="150"> <center>
    				  <strong><font color="#FFFFFF" size="2">MP3</font></strong>
    				</center></th>
   			</tr>

		<mos:tmpl name="named-rows">
			<tr>
   		 <td bgcolor="#FFFFFF"><div align="center"><font size="1">{JOS_FABRIK_FORMDATA_1.PORTADA}</font></div></td>
   		 <td bgcolor="#FFFFFF"><div align="center"><font size="1">{JOS_FABRIK_FORMDATA_1.CONTRAPORTADA}</font></div></td>
   		 <td bgcolor="#FFFFFF"><div align="center"><font size="1">{JOS_FABRIK_FORMDATA_2.TITULO}</font></div></td> 
   		 <td bgcolor="#FFFFFF">
   		  <div align="center"><font size="1">{JOS_FABRIK_FORMDATA_2.LETRA}</font></div></td>
    		<td height="19" bgcolor="#FFFFFF"> <div align="center"><font size="1">{JOS_FABRIK_FORMDATA_2.MP3}</font></div></td>
   		</tr>

		</mos:tmpl> 
			</table>
		</mos:sub>
<mos:var name="fabrik_templatevars" />
</mos:tmpl>
 
Missing something?

Am I missing something, because none of my tables have more than one group available????
 
This is an ancient thread about the old mod_tmpl templates, which we replaced with PHP templates in 1.04.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top