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

TOPIC:

Preview shows FK Dropdown, but not on form 24 Jul 2014 03:16 #12527

When I add the FK to the form, the preview shows a combo dropdown list to select from the other table:
<select name="my_foreing_key" id="my_foreing_key">
	<option selected="selected" value="">- Select -</option>
	<option value="1">Item 1</option>
	<option value="2">Item 2</option>
	<option value="3">Item 3</option>
</select>

However, the Sandbox renders an empty text box.
<input type="text" size="32" value="" name="jform[my_foreing_key]" id="jform_my_foreing_key">

What is wrong? :(

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

Preview shows FK Dropdown, but not on form 24 Jul 2014 08:40 #12532

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Simple
This is because you must open the node (in the fields tree) of the FK, and drag a sub field in the form.
Coding is now a piece of cake
The following user(s) said Thank You: gdpodesta

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

Preview shows FK Dropdown, but not on form 24 Jul 2014 14:55 #12534

What - It doesn't magically know?? sheesh, lol

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

Preview shows FK Dropdown, but not on form 26 Jul 2014 10:54 #12537

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
No, because it needs to know wich text value to display in the combo.

A possible improvement would be to use the default field of the table (yellow star), but I prefer that you understand the whole process, and also have a more customizable way.
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.382 seconds

Real time saver and great Component Builder tool ! I have been developing with J-Cook Pro Component Builder for several months now and can say with all honesty that this product/service is second to none. The product is feature rich and is being improved and added to all the time. Do yourself a favor if you need to build a Joomla! Component then you can do no wrong in trying the product. You will save on time and effort while being able to deliver your project on time. J-Cook pro does the hard work for you you then have the freedom to fully customise the end result for your own needs. 

One word: Awesome.
Edwardcox (JED)
         

Get Started