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.064 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started