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

Just wanted to congratulate you on the J-Cook website / web development tool. In a couple of visits I've had a play around with Cook and have to say I think it is fantastic.  I've played with a number of component builders in the past and yours is certainly looking like the best so far. I'd also like to help you spread the word - I'm really surprised more people aren't excited about this tool. Good luck with the project.
Dean

Get Started