The first three fields below — name, email address and University ID — will auto-populate if the form is Webauth'd to the Stanford community. See Restricting access to a form,below. Note: do not Webauth your form if you expect people outside Stanford, i.e., people without a SUNet ID and password, to use the form. You can also require that any of the fields be completed before the form can be submitted.
- Email Address (only auto-populates if the visitor has made their email address visible in Stanford You)
- University ID
- Phone Number
To add an advanced field, select the Build tab and click on the field name. As mentioned above, you can specify in Edit mode that certain fields be auto-populated, and you can require input for any field.
Exporting your data
You can download form data in Excel or CSV format:
- Log in to the Form Management screen of the Web Forms Service.
- Find the name of the form containing the desired data.
- If data is available for download, you'll see an active link in the Entries column (for example, 10 entries). Click the link. The Data Viewer opens.
- Under the name of your form, click Export your data in Excel Format (.xls) or Export your data in CSV Format (.csv). The file will automatically download to your desktop.
Restricting access to a form
You can protect a form using Webauth by adding a file named .htaccess (this file starts with a period) in the AFS directory specified for the form. This is necessary if you want the name, email and University ID fields to autofill.
See the table below for examples of AFS paths corresponding to form URLs.
See below for the example code to place in the .htaccess file. The following would protect the entire directory.
AuthType WebAuth require privgroup stanford:stanford # Add the following to auto-fill University ID WebAuthLdapAttribute suUnivID
If you needed to protect just one form, you can do so by using the following code inside your .htaccess file, making sure you use the name of the form on the first line.
<Files "name-of-your-form-here.fb"> AuthType WebAuth require valid-user </Files>
Giving form access to another person
Using iframes to insert a form in a web page
To provide for a more seamless integration into your web site's design, choose the iframe style under the Style section of the Publishing tab. Then, add code similar to the example below to your web page:
<iframe src ="http://web.stanford.edu/dept/foo/myform.fb" width="100%" height="300" frameborder="0"></iframe>
Adding links and graphics
Using basic HTML, you can add graphics, links, etc. to your forms and surveys. HTML can be added in the text of most fields as you create your form. You cannot, however, incorporate HTML into field labels.