Updated 030 How to filter a list field based on association with another field (markdown)

Amigo 2019-07-10 12:29:27 +02:00
parent 1d3784ed21
commit ce68f06c0b

@ -21,7 +21,9 @@ Let's get started on a JavaScript side of things. There are two variables. Both
### Loading Show - Class ID
The first thing we do is we load the loading show. The loading show or rather this class id, [00:06:34](https://www.youtube.com/watch?v=Z8FLifQOjUk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m34s) is loaded on the page by default when you set Fade in Affect on add. Then it by default loads that class with a nice spinner. If the loading process takes long I'm stopping the user from doing anything waiting for that spinner, [00:06:58](https://www.youtube.com/watch?v=Z8FLifQOjUk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m58s) you don't need to add that. Then I am finding the options for the region, I'm removing all of them. Then I'm triggering an update. This update that we are triggering here lizt, is a Joomla function. [00:07:19](https://www.youtube.com/watch?v=Z8FLifQOjUk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m19s) It's possibly going to change in the future. So keep that in the back of your mind. If things break, it is possible happening right here. Because this list field is dynamically generated by Joomla. And so we literally telling it draw that list again. But after having removed everything.
First load the 'jQuery("#loading"),show);' [00:06:34](https://www.youtube.com/watch?v=Z8FLifQOjUk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m34s) Now this show or rather the class ID, is loaded on the page by default when Fade in Affect is set on 'Add'. Then by default loads that class with a spinner. If the loading process takes long the user is incapable from doing anything, [00:06:58](https://www.youtube.com/watch?v=Z8FLifQOjUk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m58s) It is not necessary to add that. Then I am finding the options 'find('option')' for the region, and remove all of them. Then an update is triggered. <<<<<<<<<<<<<<<
This update that we are triggering here lizt, is a Joomla function. [00:07:19](https://www.youtube.com/watch?v=Z8FLifQOjUk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m19s) It's possibly going to change in the future. So keep that in the back of your mind. If things break, it is possible happening right here. Because this list field is dynamically generated by Joomla. And so we literally telling it draw that list again. But after having removed everything.
### GetRegion