cancel
Showing results for 
Search instead for 
Did you mean: 

Form.addSubmitElement

zladuric
Champ on-the-rise
Champ on-the-rise
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?
1 REPLY 1

zladuric
Champ on-the-rise
Champ on-the-rise
I came a step further: if my button is within the
<form>
tag, it will work. If not, it seems not to.

/me goes of to hide one button and click it when another one is clicked Smiley Sad
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.