Forums

Tabs in form (Joomla!1.5)

deaddy64 30 Apr, 2009
Hi.
In FAQ I saw a sample code for creating tabs in form:

<?php
$tabs = new mosTabs(1);
$tabs->startPane( 'test_form' );
$tabs->startTab( 'Tab 1', 'tab_1' );
?>
Name: <input name="name" value="" type="text">
<?php
$tabs->endTab();
$tabs->startTab( 'Tab 2', 'tab_2' );
?>
E-mail: <input name="email" value="" type="text">
<?php
$tabs->endTab();
$tabs->startTab( 'Tab 3', 'tab_3' );
?>
{imageverification} 
<?php
$tabs->endTab();
$tabs->startTab( 'Tab 4', 'tab_4' );
?>
<input name="submit" value="Submit" type="submit">
<?php
$tabs->endTab();
$tabs->endPane();
?>

I try to use it but I have a error message such as: "Class 'mosTabs' not found in .../components/com_chronocontact/chronocontact.html.php".
What can I do to work it well?
Thank you for this useful component. Exuse for my English.
Max_admin 30 Apr, 2009
Hi,

in J1.5 this was changed, here is an example:


<?php
jimport('joomla.html.pane');
$pane   =& JPane::getInstance('tabs');
echo $pane->startPane("paneid");
echo $pane->startPanel( 'title for tab', "tabid" );
?>
HTML code here
<?php
echo $pane->endPanel();
echo $pane->startPanel( "title for tab", 'tabid2' );
?>
another tab
<?php
echo $pane->endPanel();
echo $pane->endPane();
?>



Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
deaddy64 01 May, 2009
Thank you.
I'll try it. lightbulb
This topic is locked and no more replies can be posted.