Skip to Content Skip to Menu

Combine two fields in CB

  • Vorak
  • Vorak
  • OFFLINE
  • Posts: 218
  • Thanks: 41
  • Karma: 3
3 months 3 days ago #338954 by Vorak
Combine two fields in CB was created by Vorak
Hello,

I am wondering if it is possible, and if so, how to combine two fields in CB. I will explain more in detail:

Our users can follow certain courses. When they complete a course, we (admins) update their profile and select the course(s) they have completed. This list of courses they can complete is in a "Check Box (Multiple)" CB field.

Based on these fields, I have set up a list in List Management, so that we can at all times see an overview of the users who completed courses, and if so, which ones.

To this I would like to add the possibility to add a date on which they completed the course. This field would only apply, of course, if a user did finish a certain course. 
Each date field would have to be specifically associated with that particular course field, as users can complete different courses at different dates. 

After that is implemented, the idea is of course that the list in List Management also shows the complete date for each course a user has completed.

How could I possibly do this? I would think that perhaps CB Auto Actions or something would be needed, but I have no idea how to go about it. CB Auto Actions is something complex for me I can't really wrap my head around no matter how much I try. 

Thanks!
 

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
3 months 2 days ago #338957 by krileon
Replied by krileon on topic Combine two fields in CB
CB Field Groups would likely be most ideal for this. You'd have a dropdown select field for selecting the course and a date field for supplying the completion date. CB Field Groups allows for repeating sets of fields just like Joomla's repeat fields in backend or in various CB plugins (e.g. CB Conditional, CB Auto Actions, User Lists, etc..).

www.joomlapolis.com/addons/cb-field-groups

Our demo site has a demo showcasing selecting a phone number type and supplying the phone number for that type. Your usage is basically the same, but different field types.

demo.cbdemosites.com/


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.

  • Vorak
  • Vorak
  • OFFLINE
  • Posts: 218
  • Thanks: 41
  • Karma: 3
3 months 2 days ago #338966 by Vorak
Replied by Vorak on topic Combine two fields in CB
Thank you, that does seem to provide what I had in mind. However, I don't know if I can't figure it out or if it isn't possible, but what I am trying to do is this:

I have ONE field of the type "Check Box (Multiple)". In there, there are different values - one for each course, with the possibility to select more than one.

So what I'm actually trying to do, is to connect to each individual VALUE a connection with a different FIELD for a date.

Right now, this doesn't happen. If I have e.g. two date fields, then first I see those 2 dates listed, and then below it the courses listed. They're not next to each other and not associated with each other, probably because they're not two FIELDS but a VALUE and a FIELD instead. This is something significantly different from what you show in the demo with the phone number.

So I guess what I'm saying is: I'm trying to connect a VALUE to a different FIELD. Is that possible?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
3 months 2 days ago #338967 by krileon
Replied by krileon on topic Combine two fields in CB
I suppose you could create a date field for each course then use CB Conditional to display those date fields based off if that course is selected or not.


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.

  • Vorak
  • Vorak
  • OFFLINE
  • Posts: 218
  • Thanks: 41
  • Karma: 3
3 months 1 day ago #338974 by Vorak
Replied by Vorak on topic Combine two fields in CB
Thanks for all the suggestions, I tried with CB Conditional too but as I struggled to have neat vertical lists of completed courses with next to it a list of dates, I found a much easier solution:

Only use date fields, one for each course. The title of the field is the name of the course.
If a date is filled out for a certain course, then the field (course name + date) are visible, otherwise it is not visible.
This creates a neat, vertical list of completed courses for each student, with the dates of completion neatly put next to it.

Thanks for helping to think about a solution!
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum