javascript - Elements from a joined table can't be retrieved

Borox

Member
Hi,
One 'main' table joined to another table.
I added a button in the form using the 2 tables ( in the group corresponding to the 2nd table).
When I try to get the value of an element from the 2nd table, it doesn't work. It works great if I try to get an element from the 'main' table:

OK:
JavaScript:
var no_evt = Fabrik.getBlock('form_112').formElements.get('nkqs9_users___id').getValue();
window.location.href ="/index.php/collaborer/evenements/travaux-non-termines/details/5/"+no_evt;

KO:
JavaScript:
var no_evt = Fabrik.getBlock('form_112').formElements.get('nkqs9_jcomments___object_id').getValue();
window.location.href ="/index.php/collaborer/evenements/travaux-non-termines/details/5/"+no_evt;

We can't get values from joined tables?

Thanks.
 
Have you checked the element id, either by inspecting it or in the debug console?

In the debug console, you can type ...

Fabrik.blocks.

... and it'll show you an autocomplete to select the block name, select it, then add another . and start typing formElements, autocomplete that, add another dot

Fabrik.blocks.form_X_Y.formElements.

... and it'll show you all the element id's.

https://www.screencast.com/t/kZTIJxEDPYa

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

Thank you.

Members online

No members online now.
Back
Top