Selecting list values for another list

  • Bibbp
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 40
  • Thank you received: 0

Bibbp created the topic: Selecting list values for another list

Hello,

I'm sure this must have been asked many times before but I cannot find it. I have one data store of people (3 fields). I have another data store which needs to select from these people and to add them to its data store. How do I do this please?

Peter
#234704
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 1938
  • Karma: 67
  • Thank you received: 234

mihaela replied the topic: Selecting list values for another list

Hello,

Can you please explain a bit more what you want to achieve?

Is what you want to achieve that after one option in first select list is selected that then second select list is filled with possible options.

If that is the case you can take a look at this since here similar thing is explained crosstec.org/en/forums/3-breezingforms-f...-country.html#206654 or this one
crosstec.org/en/forums/1-forums/125454-s....html?start=6#233047 .

Let me know whether this is what you wanted to achieve.

Regards,

Mihaela
#234708
  • Bibbp
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 40
  • Thank you received: 0

Bibbp replied the topic: Selecting list values for another list

Hi Mihaela,

It looks as though the second one is close. This is all ContentBuilder

I have a datastore called Counties, with a single field called County. It is set to Group No.
(There is a view over this datastore called Counties with the same field County - I think this bit is irrelevant here).

I have a second datastore call Residents, which has a field called cb_county, and a view called Residents with three fields called County, C1 County, and C2 County.

I want to use the values from the Counties datastore as possible select values for the three fields in the Residents view.

I have put the following code in County field (set to Select) of the Residents View, firstly in the Init(JS) section:
function County_init() {
setInterval(setlist, 500);
} // ff_formname_init

function setlist() {
var list = ff_getElementByName('county');
for (var i = 1; i <= 4; i++){
list.options = new Option(ff_getElementByName('option'+i).value,
ff_getElementByName('option'+i).value, true, false);
}
}

And the following in the Action Code:
function ff_County_action(element, action)
{
var list = ff_getElementByName('County');
for (var i = 1; i <= 4; i++){
list.options = new Option(ff_getElementByName('option'+i).value, ff_getElementByName('option'+i).value, true, false);

}
} // ff_uploadelementname_action

I am not seeing the values, only the empty Select box.
#234710
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 1938
  • Karma: 67
  • Thank you received: 234

mihaela replied the topic: Selecting list values for another list

Hello,

Ok, I understand what you want to achieve.

The solution that you are using is for BreezingForms form and it can not be used in ContentBuilder if the View is created based on Data Storage.

Either way, there is a way to achieve what you want.

What you are asking is a bit of custom solution, but here is an explanation on how to make it work as you wanted.

In this topic the same type of query is covered crosstec.org/en/forums/37-contentbuilder...rop-down.html#232119 .

Let me know whether you have managed to set it for your view.

Regards,

Mihaela
#234724
  • Bibbp
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 40
  • Thank you received: 0

Bibbp replied the topic: Selecting list values for another list

Hi Mihaela,

This is not quite what I was envisaging because I have about 50 fields that will require this treatment, and that must create an performance hit. Is there a way then the user can directly maintain the group list?

Thanks

Peter
#234729
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 1938
  • Karma: 67
  • Thank you received: 234

mihaela replied the topic: Selecting list values for another list

Hello again,

So you would need to fill options in 50 select lists based on values submitted in the other view?

If so this is the only way to do so.

Can you please explain a bit more what you mean by: "Is there a way then the user can directly maintain the group list?" in which way exactly would you like the user to maintain the group list?

Regards,

Mihaela
#234746
Moderators: ForumSupporttomeperica
Time to create page: 0.077 seconds

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99€

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here