Skip to Content Skip to Menu

Create a field of "Drop-down single selection" for country

  • shih
  • shih
  • OFFLINE
  • Posts: 49
  • Thanks: 1
  • Karma: 0
6 years 1 month ago - 6 years 1 month ago #306645 by shih
Hello, I made a "field" for users to select their country. I copied the country code from the link below:
www.freeformatter.com/iso-country-list-html-select.html

And pasted them like below:
in both "Profile Edit Layout" and "Registration Value Layout".




I successfully created a field of drop-down single selection for all the countries like below:


However, in the profile page, the country I selected from the drop-down never shows, please see below.


I checked the table called #_comprofiler_fields in my database, it's like below:



Anyone know what's wrong with this field I created? I want the country the user selected to show in the profile page. How can I make it happen?
Attachments:
Last edit: 6 years 1 month ago by shih.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48314
  • Thanks: 8253
  • Karma: 1443
6 years 1 month ago #306694 by krileon
That's not how profile value layout works. That's just to alter the display of a field. It has no storage behavior for your custom HTML. You need to have a database table with your countries then use CB Query Field to build a select field from that custom database table as shown in the below tutorial.

www.joomlapolis.com/documentation/345-cb-query-field/tutorials/18377-configuring-a-country-field-with-cb-query-field-plugin


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

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

Moderators: beatnantkrileon
Powered by Kunena Forum