Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

What field type to record a set of receipt numbers & dates?

  • GUEST
7 years 8 months ago #293929 by
Hi
I am looking for suggestions as to the best way to incorporate fields that, for each membership year (each year being defined as a selection from a multiple check box), records a receipt number and (separately if need be) receipt date.

So something like
Option 1
Value Label
123 2015
234 2016
456 2017
Option 2
Value Label
2015-01-01 2015
2015-02-02 2016
2015-03-03 2017

Or better still
Option 3
Value Value Label
123 2015-01-01 2015
234 2016-02-02 2016
456 2017-03-03 2017

I could do it via a separate table linked to comprofiler but I am not sure that is the 'safest' way forward. It would sem better to include it in comprofiler so that I can use cb code to maintain that data.

Or can I, using options 1 & 2, write code to change the value if I fill it with dummy values on field creation,

any suggestions gratefully received.

Regards
Nick

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48708
  • Thanks: 8319
  • Karma: 1447
7 years 8 months ago #293941 by krileon
You'd need to likely use a CB Query Field and its Query Select fieldtype in combination of a separate database table. I've no idea what's creating or managing receipts, but I assume the dropdown values need to be different per user and only way to do that is a separate table that you query for.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • GUEST
7 years 8 months ago #293958 by
Hi Kyle

ah hah! that makes sense. If I can tie an external table to the cb tables via CB Query Field that should overcome my concern about the integrity risks of using external tables.

Thanks - I will give that a try.

Regards

Nick

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

Moderators: beatnantkrileon
Powered by Kunena Forum