Insert a hyperlink InfoPath 2007

Author: mety Nagm Labels::



When you design a Microsoft Office InfoPath form template, there are three ways to incorporate hyperlinks into your design. You can create a static hyperlink in your form template, which is a specific hyperlink that users cannot modify. You can insert a dynamic hyperlink, which changes, depending on data entered into the form template. Or, you can allow users to add hyperlinks when they fill out a form based on your form template

Create a static hyperlink

Use this technique when you want to include a specific hyperlink in your form template. Users cannot edit this hyperlink when they fill out a form based on your form template.
  1. On the form template, click where you want to insert a hyperlink, or select the text or picture that you want to turn into a hyperlink.
  2. On the Standard toolbar, click Insert Hyperlink Button image, or press CTRL+K.
  3. In the Address box, type the URL that you want to link to.
  4. To change the hyperlink text that appears on the form template, type the text that you want in the Text box. Note If you selected a picture in step 1, this option is unavailable.
  5. To assign a ScreenTip that will appear when a user rests the mouse pointer over the hyperlink, click the Advanced tab, and then in the ScreenTip box, type the text that you want to display.
Tips
  • To quickly insert a static hyperlink, you can type a Web site address (such as http://www.contoso.com/), a file location, or an e-mail address directly in the form template. When you enter a space after the text that you typed, InfoPath formats that text as a blue, underlined hyperlink. To automatically create a hyperlink for text that includes spaces, enclose the phrase in quotation marks ("). For example, to link to a file that contains spaces in its file name, type "http://www.contoso.com/file name.htm", and then press ENTER.
  • You cannot use the Insert Hyperlink feature to create or link to bookmarks (bookmark: A location or selection of text in a file that you name for reference purposes. Bookmarks identify a location within your file that you can later refer or link to.), as you can in some other Microsoft Office programs. If your form template is very long, and you want to provide an easy way for users to navigate between the different sections, you might consider creating two or more views of the form template. You can then add an automated rule that switches between the views when users click buttons on the form.


Create a dynamic hyperlink

If you want a hyperlink to change depending on values in the form, you can include a dynamic hyperlink in your form template. To create this type of hyperlink, you must bind (bind: To connect a control to a field or group in the data source so that data entered into the control is saved. When a control is unbound, it is not connected to a field or group, and so data entered into the control will not be saved.) the hyperlink to a field (field: An element or attribute in the data source that can contain data. If the field is an element, it can contain attribute fields. Fields store the data that is entered into controls.) in the data source (data source: The collection of fields and groups that define and store the data for an InfoPath form. Controls in the form are bound to the fields and groups in the data source.). Depending on the design of your form template, you can bind the hyperlink to one field and the display text to another field.
For example, imagine that you work for an international importing company, and that you use a browser-enabled form template (browser-enabled form template: A browser-compatible form template that has been published to a server running InfoPath Forms Services, and that has been browser-enabled so that users can both display and fill out the form in a Web browser.) to query suppliers about inventory. In your supplier survey form template, you can insert a hyperlink and bind it to the field in the data source that contains the URL value associated with the supplier. If you want the hyperlink to show the name of the supplier rather than the URL, you can bind its display text to a field in the data source that contains the supplier name value. When users click the supplier name on the form, that supplier's Web page opens in a browser window.
  1. On the form template, click where you want to insert a hyperlink, or select the text or picture that you want to turn into a hyperlink.
  2. On the Standard toolbar, click Insert Hyperlink Button image, or press CTRL+K.
  3. Under Link to on the General tab, click Data source, and then click Select XPath Button image.
  4. Select a field or group, and then click OK.
  5. Under Display, do one of the following:
    • To display a specific string of text for the hyperlink, click Text, and then in the Text box, type the text that you want to display.
    • To have a value inside a control on the form template display as the hyperlink's text, click Data source, click Select XPath Button image, and then select the field or group that the control is bound to.
  6. To assign a ScreenTip that will appear when a user rests the mouse pointer over the hyperlink, click the Advanced tab, and then in the ScreenTip box, type the text that you want to display.
Tip You can use XPath (XML Path Language (XPath): A language used to address parts of an XML document. XPath also provides basic facilities for manipulation of strings, numbers, and Booleans.) expressions to create hyperlinks that are a combination of static and dynamic data. For example, imagine that you want to create a hyperlink that links to "http://www.contoso.com/my name.html" where the Web server name, http://www.contoso.com/, doesn't change, but the file name, my name, varies depending on the data that users type into a specific field in the form. In this case, you would type concat('http://www.contoso.com/', my:name, '.html') in the Data source box under the Link to section, where name is the name of the field to which the text box is bound. The Concat function allows you to combine static text with data from other fields in the form.

Allow users to create their own hyperlinks

If you want to allow users to add their own hyperlinks when they fill out your form, you can insert a rich text box into your form template. Users can then insert hyperlinks into the rich text box, either by typing the appropriate text followed by a space, or by clicking Hyperlink on the Insert menu. The rich text box is the only control that accepts user-defined hyperlinks. When users place their insertion point inside any other control, the Hyperlink command appears dimmed.
  1. On the Insert menu, click More Controls.
  2. Under Insert controls in the Controls task pane, click Rich Text Box. Note If your form template is based on an existing data connection, the Rich Text Box Binding dialog box appears. If this happens, select a non-repeating field in which to store the control's data.
  3. To adjust the size of the rich text box, select it in the form template, and then drag the borders of the box to the size that you want.
  4. To test that everything works as you expect, click Preview Form on the Standard toolbar, and then in the preview window, type a URL in the rich text box followed by a space. The URL should automatically be formatted as a blue, underlined hyperlink.

0 comments |

Labels

Blog Archive

Powered by Blogger.

I made these pages for me and my friends to help solving the problem we face regarding Computer & internet, if anyone wants me to answer a question or find out about some information please send me email and I will try to reply.*P.S. some of the article I wrote and the other I found on the internet I posted them in sprit of learning and shearing, please forgive me if you found something you don’t want to be in my blog, email me and I will delete them. Thank you for your interest in my pages.امل نجم Amal Nagm

banner 1 banner 2