DatabaseJoin Element Bug

startpoint

Active Member
Databasejoin element have where clause: {thistable}.parent_id = '{tablename___elem_1_raw}'.
AJAX Update: Enabled.
When Data is rendered as a dropdown everything work properly - dropdown data is updated after change of the tablename___elem_1_raw value.
When Data is rendered as a radio list or checkbox previous data not cleared.
After every change on elem_1 data in elem_2 is appended to previous.
 
"It's not a bug, it's a feature".

As per the tooltip on the "Ajax Update" control:

If you use element placeholders in your Where statement, you can enable this option and the join options will be updated on the form whenever one of those elements is changed. Only applies to the main where statement, not the Filter Where. NOTE that this is currently work in progress, and as yet only works for dropdown joins.

It's one of those things I'll get round to completing (making it work for other join types) when either I need it for one of my own projects, or a paying client needs it.

-- hugh
 
elem_1 is databasejoin rendered as radio list.
elem_2 rendered as radio list.
This is my temporary solution:
JavaScript:
jQuery('#elem_1 div[data-role="suboption"]').on('click', function(){
    jQuery('#elem_2 div[data-role="suboption"]').remove();
})
If elem_2 rendered as checkbox the solution work too.
 
Yup, although there are a couple of gotchas you may run in to. This is something I've looked at, and have a pretty good idea of how to implement, I just haven't had the need to do it yet. Although I do have an ongoing project that may need this feature, so hopefully I'll get to it soon.

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

Thank you.

Members online

No members online now.
Back
Top