Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Storing member's childrens info

13 years 9 months ago #152522 by familyactivities
Storing member's childrens info was created by familyactivities
Hi guys,
I am a little stuck and hoping for some suggestions here...

I have a fairly standard cb database and I understand how to add new fields and so on.

My problem is that I need to be able to add information on my member's children, without knowing how many children I will need to store info for. At this stage only the children's name and DOB is needed.

Ideally I would love a repeatable field (like in ZOO) but I am not sure if this is possible with CB fields.

The only thing I have been able to think of is maybe having custom fields for up to maybe 15 children and then letting the members fill out the appropriate number, but this is not a very professional solution.

I am sure there is a better way, can anyone give me some guidance?

Thank you!
Cam

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

  • heyai
  • heyai
  • OFFLINE
  • Posts: 324
  • Thanks: 79
  • Karma: 24
13 years 9 months ago #152530 by heyai
Replied by heyai on topic Re: Storing member's childrens info
While such a field type would be very useful I haven't seen one around.
Unless anyone proves me wrong the option you've suggested might be the best solution for now. In the CB configuration there is an option to hide empty fields (just in case you haven't seen it). This way the front end display won't look too unprofessional, at least.

hey-ai - the community for asian guys and non-asian girls

The search bar is your friend, not just decoration!

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

13 years 8 months ago #152605 by familyactivities
Replied by familyactivities on topic Re: Storing member's childrens info
Thanks for that heyai :)

I love my pool - all my best ideas come to Me there...

I just had a thought, not sure about implementation just yet... Could I use a text field to store the values in the following format:
"Child's name";"DOB","Child2";"DOB2",etc?
Then I would just add the PHP to render the values into a form... need to give it some more thought.
If anyone is reading this knows how to implement this and would like a quick contract, let me know :)

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

13 years 8 months ago #153099 by familyactivities
Replied by familyactivities on topic Re: Storing member's childrens info
Does anyone have any suggestions at all?

There has to be a decent way of achieving this...

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
13 years 8 months ago #153131 by krileon
Replied by krileon on topic Re: Storing member's childrens info

The only thing I have been able to think of is maybe having custom fields for up to maybe 15 children and then letting the members fill out the appropriate number, but this is not a very professional solution.

Something like this is not available. You'd need to create an entirely new fieldtype plugin. You could use our file fieldtype and ajax text fieldtype plugins as examples. Your best approach currently is to have multiple fields. You could format those fields to display better on the users profile however using substitutions inside of a delimiter field such as the following.
Code:
<table> <thead> <tr><th>Child</th><th>DOB</th></tr> </thead> <tbody> <tr><td>[cb_child1]</td><td>[cb_child1dob]</td></tr> <tr><td>[cb_child2]</td><td>[cb_child2dob]</td></tr> <tr><td>[cb_child3]</td><td>[cb_child3dob]</td></tr> <tr><td>[cb_child4]</td><td>[cb_child4dob]</td></tr> <tr><td>[cb_child5]</td><td>[cb_child5dob]</td></tr> </tbody> </table>


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.
The following user(s) said Thank You: familyactivities

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

13 years 8 months ago #153219 by familyactivities
Replied by familyactivities on topic Re: Storing member's childrens info
Thank you very much for the help Kyle, it is most appreciated.
I will try both ideas and see which works better.

Probably the delimited field, as this field needs to be accessible for searching (not member search, activity searching based on kids ages..)

Thanks again,
Cam

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

Moderators: beatnantkrileon
Powered by Kunena Forum