Welcome, Guest
Username: Password: Remember me

TOPIC: How to align fields into a form?

How to align fields into a form? 25 Oct 2012 12:56 #4739

  • maxi2570
  • maxi2570's Avatar
  • Offline
  • New Member
  • Posts: 5
  • Thank you received: 2
  • Karma: 0
Hi there,

I'd like to create a page where I can fit different frames in terms of group of fields aligned llike into an invisible table e.g. 2 x 2.

I don't mean different data forms but I'd like to organize the fields into graphic frames like many Joomla page already has.


Thanks
Last Edit: 25 Oct 2012 13:01 by maxi2570.
The administrator has disabled public write access.

Re: How to align fields into a form? 25 Oct 2012 19:46 #4743

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Here's what you need - docs.joomla.org/Using_the_JHtmlTabs_class_in_a_component

Best of luck,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: How to align fields into a form? 25 Oct 2012 20:05 #4744

  • maxi2570
  • maxi2570's Avatar
  • Offline
  • New Member
  • Posts: 5
  • Thank you received: 2
  • Karma: 0
Thanks fo ryour reply.
You mean that I have to generate the component by listing every field in a unique column and only after that add different tabs by manually coding the generated files?

Thanks
The administrator has disabled public write access.

Re: How to align fields into a form? 25 Oct 2012 20:49 #4745

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
I think that to achieve this,

you may have to change your component's config (in the builder) to use 'exploded' fields, then in the view, separate them using the method in the docs...

Something like:
$options = array(
    'onActive' => 'function(title, description){
        description.setStyle("display", "block");
        title.addClass("open").removeClass("closed");
    }',
    'onBackground' => 'function(title, description){
        description.setStyle("display", "none");
        title.addClass("closed").removeClass("open");
    }',
    'startOffset' => 0,  // 0 starts on the first tab, 1 starts the second, etc...
    'useCookie' => true, // this must not be a string. Don't use quotes.
);
 
echo JHtml::_('tabs.start', 'tab_group_id', $options);
 
echo JHtml::_('tabs.panel', JText::_('PANEL_1_TITLE'), 'panel_1_id');
//Render any of the individual fields here...
 
echo JHtml::_('tabs.panel', JText::_('PANEL_2_TITLE'), 'panel_2_id');
//Render any of the individual fields here...
 
echo JHtml::_('tabs.end');
Does that make sense?

Hope it helps,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.
The following user(s) said Thank You: admin

Re: How to align fields into a form? 26 Oct 2012 08:23 #4749

  • maxi2570
  • maxi2570's Avatar
  • Offline
  • New Member
  • Posts: 5
  • Thank you received: 2
  • Karma: 0
I'll try to download the component and try your solution.
I'm currently working on the structure of the component and very soon I'll subscribe to J-Cook.
I'll let you know.

Thanks
The administrator has disabled public write access.
The following user(s) said Thank You: JoomGuy
Time to create page: 0.172 seconds

Get Started