• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

PROBLEM WITH AUTOFILL AND REPEAT GROUP

cryptlan

Member
Hello,
I have a some problems with autofill and repeat group.
3 principal lists:
  1. Expedientes (f_expedientes)
  2. Clientes (f_clientes)
  3. Contrarios (f_empresas)
Relationships between Lists:
  • EXPEDIENTES to CLIENTES (many to many)
  • EXPEDIENTES to CONTRARIOS (many to many)
EXPEDINTE form got several tabs (CLIENTES, CONTRARIOS, CENTRO DE TRABAJO, EXPEDIENTES, ...):
EXPEDIENTE FORM CONFIGURATION:
- AUTO FILL: CLIENTES
    • conection: site database
    • list: clientes
    • lookup field: -
    • field to observe: f_clientes_expedientes_DNI
    • Map data:
      {"{f_clientes___nombre_cliente} {f_clientes___apellidos_clientes}":"f_clientes_expedientes___nombre_completo","f_clientes___dni":"f_clientes_expedientes___dni","f_clientes___afiliado":"f_clientes_expedientes___afiliado_clt","f_clientes___fecha_de_afiliacion":"f_clientes_expedientes___fecha_afiliacion_clt",
      "f_clientes___movil":"f_clientes_expedientes___movil","f_clientes___telefono":"f_clientes_expedientes___telefono","f_clientes___email":"f_clientes_expedientes___email"}
    • Trigger: -
    • Edit original record: No
    • Confirm: No
    • Autofill on load: New and Edited Forms

  • TAB CLIENTES (repeat group):
    • DNI (obeserving data field, required, linked to CLIENTES LIST)
    • 6 fields at map data to be filled out
  • TAB CONTRARIOS (repeat group):
    • CIF (obeserving data field, required, linked to CONTRARIOS LIST)
      7 fields at map data to be filled out
PROBLEMS (are the same at CLIENTES TAB and CONTRARIOS TAB):
  • when I try with DNI field sometimes do not autofill the other fields.
  • when I try to add second DNI the fields to autofill take the data from the first DNI, when I type the new data at DNI thouse fields change but not always.
  • when I fill out the DNI field and I save the form. Sometimes when I go back to the registry I see the secondary fields of the CLIENTS filled out but the DNI is empty.
COULD YOU HELP ME TO SOLVE THIS?
I hope that with my explanation you have understood me.

Best Regards,
 

Attachments

  • Expedientes-CLIENTES TAB 01.png
    Expedientes-CLIENTES TAB 01.png
    32.8 KB · Views: 26
  • Expedientes-CLIENTES TAB 02.png
    Expedientes-CLIENTES TAB 02.png
    32.7 KB · Views: 17
  • Expedientes-CONTRARIOS TAB 01.png
    Expedientes-CONTRARIOS TAB 01.png
    49.8 KB · Views: 16
The autofill plugin was never designed to work with repeated groups. I've spent quite a lot of time working on adding that functionality, but it's still obviously not working right.

I logged on to your site to take a look, but the user you gave me doesn't seem to have access to the Expedientes list, I just see an empty list, with no Add button.

-- hugh
 
OK, I've done a couple of hours work on autofill in repeat groups locally, got a few fixes. I'd like to update your code and run some tests on your site. Can you provide ftp details in your My Sites, so I can upload some bug fixes (I don't want to commit them to github yet).

-- hugh
 
OK, try using the form now.

I fixed a few things in the autofill for repeat groups, which should help (although I'm still trying to figure out why it's defaulting to the first selection when you add a group).

But the main thing that was causing problems on that form was the four expediente_id joins, which you use as the FK (foreign keys) for your repeated groups (list joins). You had them set to be join elements, of type dropdown. Which means, even though they were hidden, they were each building an HTML select menu of tens of thousands of options. And each time you add a group, the join element code was having to iterate through every single option to find the default value.

And although there's "only" four elements, because they are all in repeated groups, you had as many of those huge select dropdowns as you had repeated groups. So maybe a dozen dropdown menus with 20,000+ options. Which was grinding the browser to a standstill.

I've reset those elements to be simple fields (formatted as "Integer" so the underlying table field remains an INT). That's all they need to be - a hidden field to store the single FK value in (pointing to the id of the main form's table row). That id gets automatically inserted by Fabrik. They don't need to be actual join element with dropdown controls.

I think you'll notice the difference on that page immediately. We may not have solved the autofill issues entirely, but I think we've made some good progress.

-- hugh
 
Hello,
excuse my delay.
I tried to add a second "Cliente" at Clientes Tab and do not work, and the same error at Contrarios Tab.

Best Regards,
 
OK, it'll be a day or two before I can look at this again, I'm in the middle of putting out a new release.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top