Associated fields

6 years 11 months ago #294238 by tiekubd
Associated fields was created by tiekubd
I want to create 3 fields that are tied to each other.
Field 1 is a city
Filed 2 is the year you entered the city
Field 3 is the year you left the city

How can this be done such that I can then search and say give me all users who visited London between 1990 and 1999 for example?

Please Log in to join the conversation.

6 years 11 months ago #294244 by krileon
Replied by krileon on topic Associated fields

I want to create 3 fields that are tied to each other.
Field 1 is a city
Filed 2 is the year you entered the city
Field 3 is the year you left the city

You can use CB Conditional for that. So basically Field 3 shows if Field 2 has a value and Field 2 shows if Field 1 has a value. See the below for CB Conditional tutorials.

www.youtube.com/playlist?list=PLp0puRITgC7PxD6MvmDwNNIi2HNcYxs7u

How can this be done such that I can then search and say give me all users who visited London between 1990 and 1999 for example?

Search shouldn't require any special configuration beyond ensuring those fields are set searchable and on your userlist. Then when searching your userlist specify that criteria. See the below regarding userlist configuration.



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 to join the conversation.

6 years 11 months ago #294249 by tiekubd
Replied by tiekubd on topic Associated fields
I'm going to give this a try.

Thanks

Please Log in to join the conversation.

6 years 11 months ago #294257 by tiekubd
Replied by tiekubd on topic Associated fields
Since this morning I have not been able to post a new topic. I get either

The website declined to show this webpage HTTP 403 OR

403 Forbidden
You don't have permission to access /forum on this server.

Is there something happening to your servers or site?

Please Log in to join the conversation.

6 years 11 months ago #294258 by tiekubd
Replied by tiekubd on topic Associated fields
I want to create a drop down field using values from a column in an existing cb table.
Specifically I want users to be able select the name of other site users from the drop down.

Please Log in to join the conversation.

6 years 11 months ago #294267 by krileon
Replied by krileon on topic Associated fields

Is there something happening to your servers or site?

More than likely what you're trying to post is triggering mod_security. Avoid including large chunks of code in posts.

I want to create a drop down field using values from a column in an existing cb table.
Specifically I want users to be able select the name of other site users from the drop down.

You need CB Query Field for that. The Query Select fieldtype builds its dropdown options from the database query you supply. So you could have it query for the name of other users. Example as follows.

SELECT DISTINCT `name` FROM `#__users` WHERE `id` != '[user_id]'

I don't really recommend this if your site has a lot of users as you could end up with a dropdown with thousands of options.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.227 seconds