Skip to Content Skip to Menu

[SOLVED] Adding multiple adresses in Frontend with dynamic field adding? Output in expanding table?

10 years 7 months ago - 10 years 7 months ago #242625 by Michael2014
Good morning,

how can I let users add multiple adresses into their profile? Same goes for phone numbers or other data like a project list.

I am working on a cv data base and I need to display project or multiple phone numbers or contacts in a listing.

The number of entries can´t be predefined, because the last entry needs to show up as the first item, being the most recent project. If I set up fields for each entry, i.e. entry1,entry2,entry3 etc. and display them in reverse order I will of course always have empty fields shown in a template with a fixed number of fields, i.e if I have 10 reserved fields and only five entries I have five empty lines in my output. Is there any way to have some kind of dynamic output that omits empty fields?

For the input I need something in the front end that looks like this for the user:
*****************************************************
Enter information:
Type of phone - Area Code - Phone Number
[Mobile] - [555] - [12345670]

[Add another phone number] or [next entry field]
*****************************************************

I have CB1.9 installed and just got K2.
Last edit: 10 years 7 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 7 months ago #242646 by krileon
CB does not have repeating field usage, but it's coming in a future CB 2.x release. The only way to do that right now is to create multiple sets of those same fields. You can handle their display using a delimiter field and substitutions to keep the display of the values pretty clean though. You can also set CB to hide empty field values within CB > Configuration > User Profile to keep the empty field values from showing on profile.


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: Michael2014

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

10 years 7 months ago #242707 by Michael2014
Hello Kyle,

I already feared that this might be the case. Unfortunately I haven´t found a solution with K2, either.

BUT !!!

The delimiters might actually do the trick, at least for now until you guys come up with a better solution ;) Creating between 90 and 150 fields for 30 Projects is kind of a boring job :p

I actually got this to work, but now I have another problem.

I put the delimiters inside a table with four columns and just one row, so that I don´t have to worry about empty rows if values are not filled in, and it´s at least somehow formatted.
The single fields are unpublished so they don´t appear on the front end in addition to the list that contains the delimiter fields.

But now when I want to edit the fields via "update profile" the table containing the delimiters is still there, instead of the fields with the values.

I´m just re-publishing the fields atm so that they only show up in the backend/on "update profile", with the table automatically being pushed down by the now-present fields.

Any ideas on how to solve this more elegantly?

Thanks,
Michael

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

10 years 7 months ago #242728 by Michael2014
AAAND here I am, at the end of my wits.

After successfully creating 55 single fields, upon creation of the 56th community builder crashes.

The input fields disappear and I only have a blue background with the cb menu elements placed vertically on the left side.

Any ideas on how to track this bug down? I am working on a tight schedule here and it seems that I´ve bitten off more than I can chew :pinch:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 7 months ago #242739 by krileon
Enable debug mode and maximum error reporting in Joomla global configuration then re-test. It's likely you're having a memory limit issue.

Another possible solution for you is to have the project fields managed outside of CB. You could use an extension like RSForms for custom forums or something of the sort. Then just use CB Query Fields to render those external fields from a database query.


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.

10 years 7 months ago #242790 by Michael2014
Aaah. The error message is shown in the Firefox tab is:
"ERROR 1118: Row size is too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs SQL=ALTER TABLE "****_comprofiler" ADD "**_projects10director" varchar(255) DEFAULT NULL".

I am stumped, I know of the limitations, I´ve seen the stickies about them, but wouldn´t have imagined that I´d hit that wall this soon?!

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

Moderators: beatnantkrileon
Powered by Kunena Forum