[SalesForce] Salesforce1 Publisher Action Submit Button overwrite

I created a object-specific publisher action, my objective is to submit the custom object on the redirected visualforce page.
It works fine to pass the object parameters to the visualforce page, but how can i use or overwrite the standard button??

By default the button is disabled

enter image description here

<button class="primaryButton cuf-publisherShareButton default uiBlock uiButton" accesskey="" disabled="disabled" type="button" data-aura-rendered-by="5:1853.28"><!----><span class=" label bBody truncate" dir="ltr" data-aura-rendered-by="8:1853.28">Submit</span><!----></button>

Best Answer

Working on Salesforce1 too, and I found that for you. I hope it's what you are looking for. Works perfectly for me. Here is the source doc

<script type='text/javascript' src='/canvas/sdk/js/publisher.js'></script>
<script> 
    Sfdc.canvas.publisher.subscribe({name: "publisher.showPanel",
        onData:function(e) {
            Sfdc.canvas.publisher.publish({name:"publisher.setValidForSubmit", payload:"true"});
    }});
    Sfdc.canvas.publisher.subscribe({ name: "publisher.post",
        onData: function(e) {
            alert("call some remote action here");
            Sfdc.canvas.publisher.publish({ name: "publisher.close",
                payload:{ refresh:"true" }});
    }}); 
</script>
Related Topic