Do username element trigger cascadedropdowns?

Robbert

Member
Hi all,

I made a form for reporting failures of coffee/candy machines at several locations.
Each location has a unique number. (example: 010)
Each location has one username which is the same a the number. (example: 010)

I made 2 tables, one for the locations and one for the machines.
The location table has 3 rows; location, name and opening hours.
The machines table has 2 rows, location and name, type and serial number.

Right now I made the report-a-failure form like this: you choose the location number, and ccd element on the next two elements fill in the opening hours from the location table, and the list of machines that are on that location.

What I'm trying to accomplish is to exclude choosing the location. I'd want the form checks up on the username, use that information to autofill in the location, opening hours and to populate the list of machines on that location.

I've tried the username element, set it on hidden and let the opening hours and machine elements autofill via cascadedropdown. Didn't work of course..

Any help is greatly appreciated.
 
I'd look at using the autofill form plugin. You should be able to use that hidden user element as the 'lookup field', and set Autofill On Load to "New Forms Only". Change the location and hours to fields, and the list of machines to a join.

-- hugh
 
Hi Hugh, thanks for getting back at me.

It seems the autofill form plugin isn't in the 3.0.7 package. I see it in the github package, how do I update from github? Your wiki is under construction, can't read the how-to article And why is the autofill form plugin not in the 3.0.7 package?
 
I spoke with Robbert via chat and the plugin has now been installed (it needed to be discovered & then published)
 
Thanks to Rob, he found the issue. When manually updating via FTP, you have to run discover in extention manager.
Now off to try Hughs advise :)
 
Hugh, I've tried your advise with no luck. The fields for adress and opening hours do not autofill, like it's not triggered while the trigger is set on the username plugin. With or without map data, the result is the same.

I watched the autofill tutorial also and I can't find out what I've done wrong.

I need to build two specific things in the form;

- Autofill for the locationnumber, adres and opening hours
-Users can only see their own records

I really appreciate it if someone could help me out.
 
HI
I'm really not sure what it is you are trying to achieve when looking at that list compared to your orignal descripton. Perhaps its a language thing, would you mind restating you question and including which list/ db table name and which element names refers to which part of the description

thanks
Rob
 
Hi Rob, here's a very late response, excuse me for that. I've been very busy with everything and nothing at work. This issue had no priority until now.

I'll restate my question; I want 2 forms automatically pickup the username, then trigger the cascadedropdowns to fill in their adres, postal code and town fields.

The layout is like this:

Location = username, right now it's a dbjoin to the table that contents all usernames and their adresses, postal codes, towns.
The user has to select it's username (number in this case, like: 014) this triggers the cascadingdropdown fields fine.
Name = Name from the username (in this case it's a campus or university) =ccd from the username table
Adres = ccd from the username table
Postal code = ccd from the username table
Town = ccd from the username table

The user selecting it's own username is what I want to change, so that the form picks up the username and triggers the cascadingdropdown fields.

I tried:
- UserID plugin and let the cascadingdropdown fields lookup to the userid plugin. Result was no response, ccd fields stayed empty.
- Pre-filter on username. Result was no response on the ccd fields, they stayed empty.

Any insight is greatly appreciated :)
 
Hi Rob, thanks for the visual explanation.
I tried to reproduce but I can't get it to render the name, field stays empty. First I'll update Fabrik, then I'll report if it works.
 
Fabrik is up to date now.

Tested the form but no luck.

I did a test, I made a form exact like the one in your video. There I should be reproduce that it works, but unfortunately, you can see the form 'thinking' for a bit, then results a empty field again.

I'm wondering what sits in Fabriks way, could it be a bug of is it the template.. Firebug shows no errors..
 
Hi Rob, I did apply the update/fix but now ccd's are not working at all. Cascadingdropdown elements stays empty.
 
Ok, I ran a restore and got everything working as before.

Rob, can you explain how I apply the fix?

I tried to update to the lastest github update, with non working ccds as result.
I tried to replace the cascadadingdropdown.js with the code you specified in the link, with non working ccds as result.

Could you help me with this?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top