Seems like checkbox doesn't like JavaScript actions other than load

joit

Active Member
I checked them and the only thing I can get going is the "load" action. Or am I missing something?
 
Hugh, thanks a lot for your nice video. I followed the steps but in my case it works only if I set action to "load". Here some facts:
concerning element: apply_business
full element name: userdetails___apply_business
site details should be ok!
it shows in frontend if you click Login - Don't have an account?
 
Ah, may be something to do with being in a joined group. I just tested on an element on the main form group.

I'll try it on a join here, see if that's the issue.

-- hugh
 
No, I got sidetracked into a couple of nasty issues with joined / repeat data which I've only just resolved.

I'll go back and start testing you issue again now.

-- hugh
 
OK, I can see what the issue is, but not the solution.

NOTE to self / Rob. In elementlist.js, addNewEvent(), we delegate the event thusly:

Code:
var delegate = action + ':relay(input[type=' + this.type + '][name^=' + this.strElement + '])';

... which doesn't work, because strElement has the _X suffix for the repeat count, but that's the ID, not the name. The names of the checkboxes in a repeat are table___foo[x][y], not table___foo_x[y].

But if I change it to use the name ...

Code:
var delegate = action + ':relay(input[type=' + this.type + '][name^=' + this.options.fullName + '])';
... it then fires multiple times, presumably as it now matches more than one object (each checkbox).
-- hugh
 
hi, I believe I have fixed this one in github, so now a delegated event is only added once.
 
can you point us at the page, In my local test (joined table) this works as expected, so I'd need to examine exactly what is different on your page to be able to progress further with this issue

Cheers
Rob
 
just click
Login - Don't have an account?
or
Anmelden - Noch kein Benutzerkonto erstellt?
depending on the language set.
the element name is apply_business (Label is Business)
 
Oh dear! I was looking at Fabrik 3.1 and not 3,0 - my mistake :oops:
I've back ported those fixes to 3.0
 
OK, I can confirm that the alert-example hugh provided works now.
But instead of coding in the text box I want to use the dropdown fields below (if this then that)
this still doesn't work with click/change/mousedown/ focus/...
I checked with load, this works, so my dropdown fields must be ok
 
hi
Is your target element not in the same group as the element triggering it? If so then I think I have fixed this issue in today's github commit.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top