SharePoint Blogs

on Training, Courseware, Web Part Development, SharePoint Hosting and more.

InfoPath - Hide validation message box above field

clock February 9, 2010 11:06 by author Jeff

Scenario - InfoPath form with data validation or with fields that have checked "Cannot be blank" will display a textbox above the field which can sometimes cover the label to the field the user is completing.  How annoying - right?  So let's hide those text messages but still keep the validation.

Note: Setting the field to "Cannot be blank" works best since there will still be a red asterisk on the field denoting it is a required field.  However using the data validation method would allow you to have a custom error message when the user tries to submit the form.

Here is an image of a form where the custom validation message is hidden.  Normally the validation message "Cannot be blank" would be sitting over top of the label "Title of Proposal:" - see below:

Here is a simple fix.

1.  Add a page viewer web part to a new blank web part page which will be used to display your InfoPath form.

2.  Click modify shared web part on the page viewer web part - update the link to point to the url for a new browser based InfoPath form in the link field.  You can get this url be simply going to the form library that you have associated your InfoPath form and click the new button.  Once the form opens in the browser you can copy the url from the location / address bar in your browser 

3.  Add a content editor web part to the page.

4.  Add the following in the source of the content editor web part:

<script type="text/javascript" language="javascript">
_spBodyOnLoadFunctionNames.push("HideErrorDivs");
 
function HideErrorDivs() {
var iframe = document.frames("MSOPageViewerWebPart_WebPartWPQ2");
var doc = iframe.document;
if(iframe.contentDocument)
{
  doc = iframe.contentDocument;
}
else if(iframe.contentWindow)
{
  doc = iframe.contentWindow.document;
}
 
 
var head = doc
    style = doc.createElement('style'),
    rules = doc.createTextNode('.errorDiv{display:none !important;');
 
style.type = 'text/css';
if(style.styleSheet)
    style.styleSheet.cssText = rules.nodeValue;
else
    style.appendChild(rules);
head.appendChild(style);
}
</script>

NOTE:  You will need to change the link of code that references your frame to match the name of your frame.  The line I am referring to is:

var iframe = document.frames("MSOPageViewerWebPart_WebPartWPQ2");

The id of the iframe is this case is MSOPageViewerWebPart_WebPartWPQ2.  More than likely the only part that will change is the number at the end of the id.  You can get yours by viewing the source of the page with the page viewer web part that is hosting your InfoPath form. 



NEW! - Enhanced International Google Search Web Parts for SharePoint 2010 and SharePoint 2007

clock February 1, 2010 00:14 by author Jeff

NEW! - Enhanced International Google Search Web Parts for SharePoint 2010 and SharePoint 2007 (FREE)

Just finished the new version of the Google Search Web Parts for Microsoft SharePoint Server 2010 / SharePoint Foundation Server 2010.  These web parts can be installed a "Sandbox" solution or a normal SharePoint solution.  

If you don't have SharePoint 2010 installed.  There is also a Microsoft Office SharePoint Server (MOSS) 2007 / Windows SharePoint Services (WSS) 3.0 version provided.

Will be uploading documentation and a video that will give step by step instructions on installation and use.  Very easy to install and use so I am going ahead and providing the download below for setup.  Installation will allow you to choose a site collection to have the Google Search Web Parts added in that Web Part Gallery. (Note: You can also just upload the SharePoint Solution file to the Solutions Gallery of a site collection to run as a SharePoint Sandbox Solution.)  Once installed create a new page for Google Search results and add the Google Search Results web part then just add the search box to any page that you want to have a Google search text box. These web parts are highly customizable.  Custom property are exposed in the web part pane area as Web Part attributes as shown below (NOTE: International Support):

Download - Enhanced Google Search SharePoint 2010(21KB)

Download - Enhanced Google Search SharePoint 2007(21KB) 



FREE SharePoint Web Part for Google Search

clock January 31, 2010 18:15 by author Jeff

FREE SharePoint Web Part for Google Search

FREE SharePoint Web Part for Google Search

To install or uninstall the Google search web parts

1. Double click on the file named, DeployGoogleWebparts.exe, to open the form as shown below.

FREE SharePoint Web Part for Google Search

 

2. Complete the form by filling in the (5) form fields.

Detail on each field:

a. Operation – This is a drop down list with (2) choices: install or uninstall. Choose value that matches the action you want to perform – install to deploy the web parts and uninstall to retract the web parts.

b. Web Application URL – This value represents the root of the web application. The web application is a website that has been extended or has the SharePoint ISAPI filter applied. You do NOT need to include a forward slash at the end of your URL. Example:

http://www.sharepoint-blogs.com

c. Site Collection – Each web application can have multiple site collections so the value you list in this field represents the site collection in which the Google results page will be created. You do NOT need to include a forward slash at the end of your URL. Example: http://www.sharepoint-blogs.com/sites/marketing

d. Custom Search Domain – The value you specify here will be shown on the search box web part as another location to search. Other words instead of searching all of Google just search through the one domain that is listed. You do NOT need to include the http:// part of the URL. Example: www.sharepoint-blogs.com

e. Use Safe Search - This is a drop down list with (2) choices: yes or no. By choosing yes the safe search option will be active which will remove adult themed content from your search results.

f. Start button – Once all (5) form field have been complete then click the Start button to begin the install or uninstall process.

Note: You must have an active internet connection for the Google web part to work.

Using the Google Search SharePoint Web Parts

1. Using your favorite internet browser navigate to the URL that was listed in the Site Collection form field when completing the installation form. In my example above the value was http://sharepoint.domain.com/sites/marketing. As I mentioned this is the site in which the Google Search results page will be installed. To get to the search page you need to append the following value to your site collection URL : Google%20Search%20Library/GoogleResults.aspx. The complete URL to place in the address field of your internet browser following my example would be:

http://www.sharepoint-blogs.com/sites/marketing/Google%20Search%20Library/GoogleResults.aspx

2. Below is a screen shot of the results page with a completed search on the words SharePoint Courseware:FREE SharePoint Web Part for Google Search 

Add the Google Search box web part to any SharePoint page

1. Navigate to the SharePoint page in which you wish to add the Google Search box.

2. Click the Site Actions button and choose Edit Page.

3. Choose the page zone in which to add the Google Search box and click on the Add a Web Part button.

4. A new dialog window should appear that contains all the web parts in the web parts gallery.

5. Find the category Miscellaneous then look for the Google Search Web Part as shown below:

FREE SharePoint Web Part for Google Search

6. Place a check in the box on the line item Google Search Web Part as shown above then click the Add button to place the web part on your page in the specified zone.

7. The web part should now be on the page in the zone you specified. You can now click on the Exit Edit Mode to display the normal view of the page. Note: The Google Search Web Part can be added to any page in any site collection in your web application however, all searches will be posted back to the one results page that was mentioned in the previous section.

Please check out the video demonstration of the installation / deployment the Google Search webparts. These webparts are free and are available for download using the download link below the video player.


Please be sure to check our company's website at:
IT4E (Microsoft Gold Partner) website

GoogleSearchWebParts.zip (1.10 mb)



MSDN Blog Postings » Blog Archive » SharePoint 2010 Hands on Labs

clock January 31, 2010 04:11 by author unknown
In order to complete the hands on labs you will need to install Office 2010 and SharePoint 2010. This can be a daunting task for someone new to SharePoint. Luckily the SharePoint team has released a H...
Microsoft SharePoint Full Article Link - MSDN Blog Postings » Blog Archive » SharePoint 2010 Hands on Labs


Tech Training Notes: SharePoint: New VB web part not showing up in ...

clock January 31, 2010 03:45 by author Mike Smith
Net (7) Book Review (2) Content Editor Web Part Tricks (19) InfoPath (3) PerformancePoint (1) PowerShell (2) SharePoint (120) SharePoint 2010 (19) SharePoint Administration (6) SharePoint Development ...
Microsoft SharePoint Full Article Link - Tech Training Notes: SharePoint: New VB web part not showing up in ...


Baixe já – Máquinas Virtuais dos Produtos SharePoint e Project ...

clock January 31, 2010 03:41 by author brunovelaz
Assinatura - Velaz · janeiro 31, 2010 - Publicado por brunovelaz | Project Server 2010, SharePoint 2010 | | Sem comentários ainda. Nenhum comentário ainda. Deixe um comentário. Clique aqui para c...
Microsoft SharePoint Full Article Link - Baixe já – Máquinas Virtuais dos Produtos SharePoint e Project ...


Jason's Life: SharePoint 2010 研討會- 課後心得

clock January 31, 2010 03:17 by author Jason's Life
SharePoint 2010 研討會- 課後心得. 主講人:曹祖聖主講人部落格:聖哥的資訊站 地點:微軟7A 時間:2010/1/28 09:30 - 17:30. SPS 2010 重要的變化(Version: Beta) Sites & Content 1. 支援ribbon (像是office 2007的工具列) ......
Microsoft SharePoint Full Article Link - Jason's Life: SharePoint 2010 研討會- 課後心得


Desarrollo +: Windows Server 2008 R2 es sinónimo de 64 bits y ...

clock January 31, 2010 02:20 by author Desarrollo +
Pareciera que SharePoint 2010 que solo corre en 64 bits nos hizo descubrir que SharePoint corre mejor en 64 bits. Últimamente me ha tocado hacer instalaciones en 64 bits todavía con las versiones 2007...
Microsoft SharePoint Full Article Link - Desarrollo +: Windows Server 2008 R2 es sinónimo de 64 bits y ...


Windows Mobile 7 will support Silverlight, reveals Microsoft ...

clock January 31, 2010 01:17 by author Muhammad Ali
You'll also see how you and your colleagues can be even more productive with Office 2010 and SharePoint 2010. In the afternoon we will split in two tracks focused on managing and deploying infrastruct...
Microsoft SharePoint Full Article Link - Windows Mobile 7 will support Silverlight, reveals Microsoft ...


MSDN Blog Postings » Blog Archive » Silverlight &amp; SharePoint ...

clock January 31, 2010 01:11 by author unknown
Finally these things have increased my coding adrenaline to create a code sample that integrates CRM 4.0, Silverlight 4 & SharePoint 2010. It is a very basic sample and is almost ready. Look for i...
Microsoft SharePoint Full Article Link - MSDN Blog Postings » Blog Archive » Silverlight & SharePoint ...