Stanford provides a flexible, easy-to-use web-based form service - a great free resource for site owners. According to the Web Forms Service website:
The form building application provides a selection of pre-formatted fields and elements, which makes it quick and easy to construct web forms. Data collected through the forms can be emailed to the form owner and/or stored in a MySQL database where it can be viewed through a secure web interface."
To learn more about Stanford Web Forms, sometimes know as formbuilder, visit webforms.stanford.edu.
How do I create a Stanford Web Form?
- Visit formbuilder.stanford.edu
- Click on "Create New Form" and create your form.
- After creating your form, under the "Publish" tab, set the status to live.
How do I use the Stanford Web Form in a Drupal website?
You can embed your form into a web page using inline frames (iframe). On your Drupal website, embed your iframe into a text field such as the "body" field on a node.
To embed the iframe in a text field:
- Turn off the WYSIWYG by selecting "Disable rich-text" or by selecting a text format that doesn't use a WYSIWYG (e.g., Plain text).
- Copy the web form URL from your live form or from the "Form URL" field under the "Publish" tab in Form Builder.
- Replace the URL path in this HTML line of code with the URL for your web form:
<iframe src ="http://www.stanford.edu/dept/foo/myform.fb" width="100%" height="300"></iframe>
- On your website, paste the <iframe> HTML code into the text field of your content.
- Save and test your form.
- If your site uses HTTPS, you'll need to change the URL in the iframe to use HTTPS as well. It would look like this:
<iframe src ="https://www.stanford.edu/dept/foo/myform.fb ....
- If your web form doesn't appear immediately, wait a moment, it may still need a moment to load.
- If it is still not showing up, it may be that the text format you are using doesn't allow iframe elements. Try using a different, more capable text format such as Full HTML.
- If you need to configure your text formats to allow iframes on your Drupal 7 website visit: