Welcome, Guest
Username: Password: Remember me

TOPIC: HOW-TO display two informations in a FK combo

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

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
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.
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Easy with JDom:
'dataKey' => '<%name%> - <%surname%>'
Coding is now a piece of cake
Last Edit: 24 Aug 2015 20:33 by admin.
The administrator has disabled public write access.
The following user(s) said Thank You: VeCrea

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

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
'labelKey' instead of 'dataKey' isn't it ?
Thanks,
V.
The administrator has disabled public write access.
The following user(s) said Thank You: admin

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
No in facts, it is dataKey
Coding is now a piece of cake
The administrator has disabled public write access.

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

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
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.
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
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
The administrator has disabled public write access.

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

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
I find it logical : labelkey in combos because that's what user sees, dataKey in fly, because there's no label.
The administrator has disabled public write access.
Time to create page: 0.071 seconds

Get Started