Autofill and repeated groups

remroc

New Member
Hello,

After being able to access the form element id (see topic) owing to Rob and Hugh O0, I would like to autofill a field of the repeated group through the autofill plugin.

I am using fabrik 3.0.6.3-606 just updated from git.

I have created a tablejoin (left join) from table A to table B which will create the repeat groups. Then a autofill plugin from table B to table C.

Table A
id
datetime
name (field)

Table B
id
datetime
unity(datajoin on Table C see below)
unity_price (field)
quantity (field)
total (field)

Table C
id
datetime
unity (field)
unity_price (field)

On tableb, unity is observed. tableb___unity_price should be filled through the autofill :

Code:
{"tablec___unity_price":"tableb___unity_price"}

However, it doesn't work. I wonder if :
- it is needed to add the join___43___ prefix to tableb___unity_price
- fabrik deals with the suffix _id of the element

It is possible to see the form at this URL. There is some javascript in 36.js.

Thank you for your answer and help.

remroc
 
For some reason the autofill.js isn't even being included on that page.

I'll build a test case here.

-- hugh
 
Not sure why your autofill JS isn't being included (unless you added the plugin to the original form for table C rather than the table B form)

However, even in my test, where the JS is included and fired, there's a bug which will prevent it from working on anything but the first instance of a group.

I've hit my limit on trying to fix this, so have raised a ticket for Rob:

https://github.com/Fabrik/fabrik/issues/603

-- hugh
 
Not sure why your autofill JS isn't being included (unless you added the plugin to the original form for table C rather than the table B form)

However, even in my test, where the JS is included and fired, there's a bug which will prevent it from working on anything but the first instance of a group.

I've hit my limit on trying to fix this, so have raised a ticket for Rob:

https://github.com/Fabrik/fabrik/issues/603

-- hugh

Hello Hugh,

Thank you for the ticket. To answer your question, I have attached a screen copy that shows the autofill from tableB to tableC unless I have misunderstood something.

autojoin.png


How should I do correctly the autojoin to have the autojoin.js included ? Thanks for your observation and help.

remroc
 
OK, well I think the first issue is that you have the plugin on the wrong form.

When you created the list join form A to B, it should have included a new group on Form A, like "Form A - [list B]" or some such. The elements in that group have the same full names as the original group, but they are copies which now belong to Form A, by virtue of the list join.

Then if you add a form plugin to Form A, you should see those elements on the dropdown menus in the autofill plugin settings, like Field To Observe, as 'listB.Element'

I think if you do that, you'll find that you'll be able to autofill the first group in your repeat, but when you add a new group, it won't work. That's what we're working on.

-- hugh
 
Hi Hugh,

Indeed, with a autojoin plugin between form tableA and tableC with tableb.unity the data are filled in the repeated but only for 1st group : see URL Thanks for this precision.

Let me know, how it goes with the ticket.


Thanks for your help.

remroc
 
We'll try an remember to update this thread when we fix it, but you should also keep an eye on that issue in github yourself, so you know when it's resolved.

-- hugh
 
I hope rob or cheesegrits will take a look at this issue very soon, i can't go further without this option available..please? :)
 
Hi Rob and Cheesegrits, thank you for the work. However I have an error : Fatal error: Call to undefined function apache_request_headers() in /home/worka152/public_html/yesgroup-dev/components/com_fabrik/helpers/html.php on line 155

You can see the page at : URL

Others have "nicely" highlighted this error on the forum : URL
 
Ok guys CONGRATS it is working for autofill and repeated groups. Yeapeee !!

You can see the page at : URL

Merci beaucoup !!

Cheers,

remroc
 
Hello,

Thank you for help but..there are some problems, at least for me:

First: nothing happen for a second cdd element when the group is repeated, i can't even select any value, only the option "please select" is displayed twice.

remroc, can you try to add another (second) cdd in your test list, which should depend of another cdd selection? So at the end you will have a databasejoin or dropdown as first element and two cdd (a chain cdd)

Second: i need to trigger the search only when the last cdd element is selected, in order to skip the message "performing search" for each selection (even on a dedicated server, the search is slow and became anoying to see the message every time).

The problem is when i add any element to be the trigger for the search, the autofill plugin stopped searching the values. I don't see any errors in Chrome console
 
Hello Sales2010,

I tried to create 2 cascading dropdown (i've just learned what is cdd).

It seems to work for the 2 CDD : look at URL

However the unity_price value doesn't show up for the repeated group.

Cheesegrits and Rob can you help on this ?
 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top