AnsweredAssumed Answered

Form.addSubmitElement

Question asked by zladuric on Jul 1, 2013
Latest reply on Jul 3, 2013 by zladuric
Hi,

I'm trying to attach my own button I've created dynamically as a submit element for the Share form compoment. It does not seem to work for me.

Going through the form.js file, I found this:
YAHOO.Bubbling.on("addSubmitElement", this.onAddSubmitElement, this);


Now, I fired that event along with my button (
YAHOO.Bubbling.fire('addSubmitElement', myButton
), but it doesn't work. I tried delaying this event by first listening to 'afterFormRuntimeInit' (which is fired only after the original submit elements are created), still no luck.

I tried timing it with setTimeout, and even manually triggering it from the console, no help. Which was strange, cause if I create a button by hand and fire this event from the console, the stuff works.

I've been digging into the working button and mine, even down to "private" objects like button.__yui_events.subscribers, they have the same method attached there.


What could be my problem, where could I go and look?

Outcomes