Issue in Infopath Form Ribbons


  • Hi Folks,

    I am facing strange issue in SharePoint Infopath Ribbons. I have created Infopath Ribbons using the custom action for Ribbons. Ribbons are coming properly in Infopath Browser Forms. But when i specify "RegisterationId" and

    Registeration Type so that i can register them only for single content type. This binding is not working and ribbons are not showing in specified content type. To make sure i am having correct ID for content type  I have used

    same registration type and "RegisterationId" for others ribbons locations(for E.g. Document.Manage.Controls._Children) its working fine in that case. So there is no issue in Content type ID.

    Has anyone faced similar issue. Can we not specify the infopath ribbons for specific content type??

    Sample Code for Ribbons

    <Elements xmlns="">

      <CustomAction Id="IFCustomRibbon" Location="CommandUI.Ribbon" RegistrationId="0x01010100B37C9B1EEBE29D458A2011EC60DDF544" RegistrationType="ContentType">


            <CommandUIDefinition Location="Ribbon.Tabs.InfoPathHomeTab.FormActions.Controls._children">

              <Button Id="Ribbon.Tabs.Lcms.FormActions.Controls.Complete"
                Sequence="70" Command="CompleteForm"
                Image16by16="/_layouts/$Resources:core,Language;/images/formatmap16x16.png" Image16by16Top="-48" Image16by16Left="-48"
               Image32by32="/_layouts/$Resources:core,Language;/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-96"
            <CommandUIHandler Command="CompleteForm" CommandAction="javascript:CompleteForm();

              function CompleteForm(){
                 if(confirm('asdad enter This will complete the form and send notification to interested party'))
                   var obj = document.getElementById('FormControl_V1_I1_B3');
                   if(obj != null)
                   //var $command = $get('FormControl_V1_I1_B3');




    Rohit Pasrija

    Wednesday, April 11, 2012 5:17 PM

All replies

  • Hi Rohit,

    The Location and Button id are similar in your code. Please try to give different id value.

    For Example:


    Button Id="Ribbon.Tabs.Lcms.FormActions.Controls.Complete"


    Button Id="Ribbon.Tabs.ABC.FormActions.Controls.Complete"

    You can refer to the following link.



    Monday, April 16, 2012 2:48 AM
  • Hi Jack,

    My button id (Ribbon.Tabs.Lcms.FormActions.Controls.Complete) and location ID(Ribbon.Tabs.InfoPathHomeTab.FormActions.Controls._children) are already different.

    So what else i can do to make it work



    Rohit Pasrija

    Tuesday, April 17, 2012 5:02 PM
  • Anyone has any clue for this?? Please let me know we have been struggling since last two weeks to achieve this.

    Rohit Pasrija

    Saturday, April 28, 2012 5:00 AM
  • Having the same issue at the moment... how did you solve it?

    I'm not sure... but in my opinion the RegistrationId and RegistrationType in the CustomAction-Tag are only working when you want to modify the normal Sharepoint Ribbon and not the InfoPath-Form-Ribbon...

    Tuesday, September 25, 2012 3:44 PM
  • Anyone has any clue for this?? Please let me know we have been struggling since last two weeks to achieve this.

    Rohit Pasrija

    I have the same problem , if I not set the "RegisterationId"  attribute, the custom action will add to all infopath form, if I set the attribute, the custom action will remove from all infopath form.

    I will try other way , like jquery, $("#custiom action group id").hide() to remove custom action for special infopath form when form loaded.

    • Edited by ChenYuMing Monday, December 03, 2012 3:59 AM
    Monday, December 03, 2012 3:58 AM
  • Not sure if anyone else was able to get the RegisterationId and RegisterationType working, but I wasn't.  I had to add javascript to the EnabledScript in CommandUIHandler.  This fires everytime the button is displayed on the InfoPath ribbon.  I placed a hidden Textbox in the InfoPath form with a value in it that is checked when the function in EnabledScript is run.  I can then hide/dispaly the button as required.  Here is a sample:

    <CustomAction Id="BMOSaveAndNotifyAction" Location="CommandUI.Ribbon" Rights="AddListItems,EditMyUserInfo"  >
            <CommandUIDefinition Location="Ribbon.Tabs.InfoPathHomeTab.FormActions.Controls._children">
              <Button Id="BMOControls.btnSaveAndNotify"
                Image16by16="/_layouts/inc/$Resources:core,Language;/ipfsimages.png" Image16by16Top="-96" Image16by16Left="-16"
                Image32by32="/_layouts/inc/$Resources:core,Language;/ipfsimages.png" Image32by32Top="-32" Image32by32Left="-64"
                LabelText="Save &amp; Notify"
                ToolTipTitle="Save &amp; Notify"
                ToolTipDescription="Save and send notification emails."
            <CommandUIHandler Command="BMOSaveAndNotify" 
    function BMOSaveNotifyCheck() {
        try {
            var $cntrl = $get('FormControl_V1_I1_T2');
            if ($cntrl == null || $cntrl.value != 'Incident Report') {
                var $command = $get('BMOControls.btnSaveAndNotify-Large');
                $ = 'none';
                return false;
            } else { return true; }
        } catch (err) { alert( err.message); }
    function BMOSaveAndNotify() {
        try {
            var $command = $get('FormControl_V1_I1_T1');
            $command.value = 'print';
            var a = IPFSRibbon_GetFocusedFormControlId();
            IPFSRibbon_HandleButtonClick(a, 'submit');  //this will submit the form
        } catch (err) { alert( err.message); }

    Wednesday, August 27, 2014 5:41 PM