Colour picker doesn't update automatically with calc elements

AlexTCGPro

Member
Hey there. I'm trying to use the colour picker element to dynamically generate something with an ajax calc element, but it doesn't seem to update automatically when a color is picked, I have to edit some other element to get it updated.
 
Test in element javascript which event does selecting the color triggers (just add console.log("test") to custom js code field and see if/when it appears on browser console). And if you find the event, try adding this in custom js field:

this.element.fireEvent('change', new Event.Mock(this.element, 'change'));

P.S. Not tested
 
Test in element javascript which event does selecting the color triggers (just add console.log("test") to custom js code field and see if/when it appears on browser console). And if you find the event, try adding this in custom js field:

this.element.fireEvent('change', new Event.Mock(this.element, 'change'));

P.S. Not tested
It's weird, doesn't seem to trigger any event, not even 'change'
 
Hmm, then you might be able to catch the colorpicker click event with jQuery click function in form_xx.js and trigger some element change in there to update calc element.
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top