SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am missing the developer ribbon in my infopath. Do I need to reinstall infopath from scratch? Or is there an add-in which I can perform to get the code piece for infopath.

I am trying to write some code on form load in c#. Is it possible?

share|improve this question

Open up infopath designer (there should be a shortcut, but if not you can open command prompt, navigate to the exe, and type 'infopath.exe /design')

Go to File -> Options

In the Infopath Options Menu click on the Customize Ribbon sidebar tab

Under Main Tabs there should be an unchecked 'Developer' item, check that and your good!

Once you have the Developer ribbon there, you can simply click the On Load Event button under the Events section within the developer tab and it will open up the code window. Keep in mind it (at least for me) defaults to VB, so you have to open up form options, go to programming, and change the form template code language to c#

share|improve this answer
When I open InfoPath from Start > Program Files then I see the Developer Tab. However, when I click Customize Form from SharePoint List/Library then Developer tab is gone in spite developer ribbon is checked. See the print shots of both scenario. – Angie Heimerlake May 24 '12 at 16:27
That is because custom code is NOT allowed for New/Edit/Display Item forms. You can look into the things available for non-code infopath solutions, but i would need to know what you are trying to do to help you out in that regard. If you need to write code based infopath form, you have to use a Form Library and upload it through central admin – Zork May 24 '12 at 16:30
I been trying to implement hide/disable fields based on SP Groups. So i followed few articles where they talk about using userGroup.asmx web services to hide or disable fields. I could not get the userGroup.asmx to work (even after modifying the xsd files). So I was thinking may be I can use c# code to achieve the same goal. so form load I need to hide few fields based on sp group that current user is in. Hope this makes sense. – Angie Heimerlake May 24 '12 at 16:33
I think i understand, and it makes sense (have you tried… and…), and you can definitely do this type of thing with c#, but again it cant be easily implemented with list forms. There are alternatives like using a non-infopath form and hiding with javascript (…) – Zork May 24 '12 at 17:21
This as well for non-infopath forms – Zork May 24 '12 at 17:33

You'll find the option for enabling the developer ribbon using these instructions

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.