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

TOPIC:

HOW-TO display two informations in a FK combo 23 Aug 2015 19:05 #13404

  • VeCrea
  • VeCrea's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
Could you tell me again how i can, i.e., have a combo box that displays name - surname instead of just name or surname ?
Thanks,
V.

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

HOW-TO display two informations in a FK combo 24 Aug 2015 20:17 #13413

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Easy with JDom:
'dataKey' => '<%name%> - <%surname%>'
Coding is now a piece of cake
The following user(s) said Thank You: VeCrea

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

Last edit: by admin.

HOW-TO display two informations in a FK combo 24 Aug 2015 20:27 #13415

  • VeCrea
  • VeCrea's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
'labelKey' instead of 'dataKey' isn't it ?
Thanks,
V.
The following user(s) said Thank You: admin

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

HOW-TO display two informations in a FK combo 24 Aug 2015 20:32 #13419

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
No in facts, it is dataKey
Coding is now a piece of cake

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

HOW-TO display two informations in a FK combo 24 Aug 2015 20:54 #13421

  • VeCrea
  • VeCrea's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
Well in form, it works with labelKey and not dataKey for me, and it seems correct because the select box uses a database field name as datakey and i want to keep what i built in the builder, but the information displayed in the combo comes from the labelKey, if i'm correct.
Thanks,
V.

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

HOW-TO display two informations in a FK combo 25 Aug 2015 11:18 #13422

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Yes true for combos, but for simple fly, dataKey is used.
I know it is little bit wired. I should give a look there.
Coding is now a piece of cake

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

HOW-TO display two informations in a FK combo 25 Aug 2015 18:53 #13423

  • VeCrea
  • VeCrea's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
I find it logical : labelkey in combos because that's what user sees, dataKey in fly, because there's no label.

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

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

Although I found this tool some time ago I just started learning experimenting and building this first component on Monday and now on Thursday afternoon it's already online. Although I already had a working version done with another tool this is much easier to build and at the end you have the freedom to own your own component. Once you know how to use Cook you will boost your productivity as the learning curve is really moderate compared to many other tools.
Giori (Forum)

Get Started