Issue in Infopath Form Ribbons
-
11 April 2012 17:17
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="http://schemas.microsoft.com/sharepoint/">
<CustomAction Id="IFCustomRibbon" Location="CommandUI.Ribbon" RegistrationId="0x01010100B37C9B1EEBE29D458A2011EC60DDF544" RegistrationType="ContentType">
<CommandUIExtension>
<CommandUIDefinitions><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"
LabelText="Complete"
TemplateAlias="o2"
ToolTipTitle="Complete"
ToolTipDescription="$Resources:CcaLcms,cui_desc_CompleteForm;"/>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="CompleteForm" CommandAction="javascript:CompleteForm();function CompleteForm(){
if(confirm('asdad enter This will complete the form and send notification to interested party'))
{
confirm('Enter');
var obj = document.getElementById('FormControl_V1_I1_B3');
if(obj != null)
{
alert('Yes');
obj.onclick();
}
//var $command = $get('FormControl_V1_I1_B3');
//alert($command);
//$command.click();}
}"/>
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
</Elements>Rohit Pasrija
Semua Balasan
-
16 April 2012 2:48Moderator
Hi Rohit,
The Location and Button id are similar in your code. Please try to give different id value.
For Example:
From:
Button Id="Ribbon.Tabs.Lcms.FormActions.Controls.Complete"
To:
Button Id="Ribbon.Tabs.ABC.FormActions.Controls.Complete"
You can refer to the following link.
http://blog.symprogress.com/2011/03/add-custom-commands-on-infopath-browser-form-ribbon/
Thanks,
Jack
- Diedit oleh Jack-GaoMicrosoft Contingent Staff, Moderator 16 April 2012 2:50
-
17 April 2012 17:02
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
Thanks
Rohit
Rohit Pasrija
-
28 April 2012 5:00Anyone has any clue for this?? Please let me know we have been struggling since last two weeks to achieve this.
Rohit Pasrija
-
25 September 2012 15:44
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...
-
03 Desember 2012 3:58
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.
- Diedit oleh ChenYuMing 03 Desember 2012 3:59