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

TOPIC:

Creating a Dropdown or Radio without FK table 06 Jul 2016 06:59 #14154

Hi,
I would like to create a basic dropdown list - or radio button - with 3 items (Yes, No, Not Applicable) - without creating a table for it.

I have lots of these to do, and the values are all a little different. Creating tables for each one isn't really viable (too many).

I guess I can fork the code if I have too.

Is there a way with the Online Generator?

Grateful for any pointers...
Just call me Chris :)

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

Creating a Dropdown or Radio without FK table 06 Jul 2016 07:23 #14156

I think I found my answer - is the Enumeration Field.

I wondered what that was for :)
Just call me Chris :)

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

Creating a Dropdown or Radio without FK table 06 Jul 2016 09:36 #14158

Indeed :)

I personally try to use the enum only for thing that are highly unlikely to change, such as "gender"
When you use an enumeration, you loose flexibility.

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

Creating a Dropdown or Radio without FK table 06 Jul 2016 12:20 #14160

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I think @organicweb is correct. Enum is the best choice for that.
They are translatable strings, and you can edit them in the helper. I think it is flexible.

What I think it that they are not properly coded. I have to rewrite this part in future.
They WILL be located in
helpers/html/lists.php
And the call you not pass through the view file (too heavy). It will be a simple static call from the template.
For the moment, is is working anyways.

EDIT : And in the form, you can change the aspect (combo / radio / list)
Coding is now a piece of cake

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

Last edit: by admin.
  • Page:
  • 1
Time to create page: 0.080 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