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

TOPIC:

Dropdown in Form 30 Oct 2012 07:56 #4848

Is it possible to add a dropdown to the form in Cook? for example, I have an Integer field. Instead of a text box I want to add a dropdown with integers assigned as the values.

Example:
<select>
  <option value="1">Option 1</option>
  <option value="2">Option 2</option>
</select>

Instead of this:
<input type="text" name="Option">

See the Server field in the screenshot.

--
Jerry Benton

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

Last edit: by jcbenton.

Re: Dropdown in Form 30 Oct 2012 08:36 #4850

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
1 - you could either use an FK field to grab values into a combobox (dropdown) by
  • dragging an Foreign Key field type to your table
  • dragging the table element to the FK field
  • select a field from foreign table, i.e. title to use as label
OR

2 - you could use an enum type field
  • drag enum field type to your table
  • populate the value|label pairs
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: Dropdown in Form 30 Oct 2012 08:41 #4852

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Ignore previous post!

Sorry, just coming to life here...

jcbenton wrote: See the Server field in the screenshot.


Can you see some left/right buttons over to the right of your field? Use them to switch to combobox. That should do the trick for you.

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: Dropdown in Form 30 Oct 2012 08:53 #4854

Ok I added another table and made the dropdown. I will try it out in the sandbox. Thanks.
--
Jerry Benton

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

Re: Dropdown in Form 01 Nov 2012 11:28 #4889

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
As said @audibleid,

You can use the tiny buttons at the right to change the input aspect (list, combo, radio)
This part of the builder is lacking a little bit (graphical), but it works.
Coding is now a piece of cake

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

  • Page:
  • 1
Time to create page: 0.087 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started