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

  I found "cook" two days ago. Played around with it for a day and then within a day got rid of two legacy applications in IBM Lotus Domino Notes and replaced them with "cook". It was really easy. A piece of cake. Actually it was even easier than cooking. Cooking involves more work than developing with "cook". What can I say about "cook"? Great application great price for what it delivers great forum with a lot of information and fast responses active and friendly community fast forward moving development cycle So what should I say "Monsieur Le Cook"? Keep the good work going it will lead to success. Having become a paying member in the words of Edith Piaf may I say ..... non rien de rien ... je ne regrette rien. Vive La France.
FK (JED)
         

Get Started