UbiquoFormBuilder Tabs syntax

2 views
Skip to first unread message

Jordi Beltran

unread,
Sep 9, 2011, 12:52:42 PM9/9/11
to ubiquo...@googlegroups.com
Hi guys,

I have a syntax question... I'm going to implement tabs on ubiquo forms as it's said on (http://ubiquo.lighthouseapp.com/projects/27683/tickets/492-extra-features-for-ubiquoformbuilder-fields) but I'm not sure about the syntax.

An example would be something like this:

<% ubiquo_form_for(@person) do |form| %>
  <% form.group(:type => :tabbed) do |group| %>
    <% group.add(t("personal_data")) do %>
      <%= form.text_field :name %>
      <%= form.text_field :surname %>
      <%= form.datetime_select :date_of_birdth %>
      <%= form.category_selector(:country, :type => :select) %>
    <% end %>
    <% group.add(t("hobbies")) do %>
      <%= form.category_selector(:hobbies, :type => :autocomplete) %>
    <% end %>
    <% group.add(t("professional") do %>
      <%= form.text_field :title %>
      <%= form.text_field :company_name %>
    <% end %>
  <% end %>
<% end %>

In case you want to untabb it, change the type to :div

What do you think? Is what you would expect?


Thanks!

--
Jordi Beltran
Project Manager
jbel...@gnuine.com

gnuine
www.gnuine.com

C/ Pamplona, 96
Local 17
08018 - Barcelona

tel: +34.93.567.94.94
fax: +34.93.567.94.95

Bernat Foj Capell

unread,
Sep 12, 2011, 2:25:43 AM9/12/11
to ubiquo...@googlegroups.com
Hi Jordi,

It's ok for me, but I think that it should be configurable what the default type is, so that if you want to transform all groups into tabs, you just configure it.

Also, it might be considered if tabs should in fact become the default field group display method.

Cheers,
Bernat

--
Heu rebut aquest missatge perquè esteu subscrit al grup "ubiquo" de Grups de Google.
Per publicar a aquest grup, envieu un correu electrònic a ubiquo...@googlegroups.com.
Per anul·lar la subscripció a aquest grup, envieu un correu electrònic a ubiquo-gnuin...@googlegroups.com.
Per obtenir més opcions, visiteu aquest grup a http://groups.google.com/group/ubiquo-gnuine?hl=ca.



--
Bernat Foj Capell
bf...@gnuine.com


gnuine
www.gnuine.com
C/ Pamplona, 96
Local 17
22@ - 08018 Barcelona

Tel: +34.93.567.94.94
Fax: +34.93.567.94.95

Ramon Salvadó

unread,
Sep 12, 2011, 2:53:07 AM9/12/11
to ubiquo...@googlegroups.com
Hi,

  I would like to add that some kind of "automatic" (meaning available) tabs would be cool:

* Required fields
* Related fields
* Media fields
* Category fields

  I think it would be useful if they could be combined into a single tab, ex: maintab => Required & Media, etc.

  If all tabbing could be done automatically this should provide UI consistency and predictability at the cost of usability in some cases, but for the corner cases explicit tabbing could be  used... this has potential for improving forms without doing much extra work.

  But maybe we should discuss all of this, after there is an initial implementation. I don't think it's needed for the first iteration.

Regards
Ramon

2011/9/9 Jordi Beltran <jbel...@gnuine.com>

--

Jordi Beltran

unread,
Sep 14, 2011, 4:50:27 AM9/14/11
to ubiquo...@googlegroups.com
Hi,

thanks for the comments.

Bernat, I'll add a configuration parameter to "unfold" all tabs from an application, as suggested by Bernat.

Ramon, the "automatic tabbing" features seems cool. I agree with you that it would be out of scope by now. I invite you to create a ticket for this topic.


Cheers,
Jordi

2011/9/12 Ramon Salvadó <rsal...@gnuine.com>
Reply all
Reply to author
Forward
0 new messages