Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

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

Please Log in or Create an account to join the conversation.

Last edit: by maxi2570.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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!!!

Please Log in or Create an account to join the conversation.

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

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

Please Log in or Create an account to join the conversation.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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 following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

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

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 following user(s) said Thank You: JoomGuy

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.062 seconds

First of all... I have to congratulate you guys for the awesome tool... I came here only to see what this thing was up to and I have to tell that I'm very impressed with what this tool can do. French guys are making a revolution on Joomla... first with Seblod and now Cook...
Griiettner (forum)

Get Started