Collecting Guestbook Entries
Example
- Collecting fan comments about the Funky Jello band.
MGI Tags
- mgiGuestbook
- mgiFieldContent
- Guestbook Insertion Marker
Steps
- Create a form to collect fan comments and contact information.
- Name the form fields.
- Enter a form action and method.
- Save the form.
- Create a thank you page.
- Save the thank you page and open it in a text editor.
- Insert the mgiGuestbook tag.
- Format the guestbook entry with text, HTML, mgiFieldContent tags and
other MGI tags.
- Save the thank you page.
- Create a page to display guestbook entries.
- Save the display page and open it in a text editor.
- Insert the Guestbook Insertion Marker.
- Save the display page.
- FTP the guestbook form, thank you page and display page to the web
server running MGI.
- Complete and submit the guestbook form and view the guestbook entry.
Step 1: Create a form to collect fan comments and contact information.
- Enter HTML form fields on a page using a graphic editor or text editor.
Enter a label and default size text field for Name and Email. Enter a Pop-Up
menu labelled Favorite Song with the options All Funky Jello Songs, Monday
Night Party, Funk City, The Day, and How Goes It. Next, enter instructions
and a Comment text box with 7 rows and 50 columns. Finally, enter a submit
button named "Post Your Comments". The following is an example
guestbook form:
Step 2: Name the form fields.
- Name the text fields, pop-up menu and the text box with a unique name.
For example, name the first text field "Name", the second text
field "Email Address", etc. You may use capitalization and spaces
in the form field names.
Step 3: Enter a form action and method.
- A form action sends guestbook information to a separate "thank
you" page for processing. Enter the name of the thank you page (thankyou.html)
in the action parameter of the <FORM> tag. Enter "post"
in the method parameter of the <FORM> tag. For example,
<FORM ACTION="thankyou.html" METHOD="post">
...text fields, pop-up menu, text box, and submit button appear here...
</FORM>
Caution: A beginning and ending <FORM>
tag must enclose all form elements including text fields, text boxes and
buttons for the form to function properly. |
Step 4: Save the form.
- Save the guestbook form you have created.
Step 5: Create a thank you page.
- Create a new page and enter the sentence "Funky Jello loves to
hear from our fans. Thanks for signing our guestbook".
Step 6: Save the thank you page and open it in a text editor.
- Save the thank you page and name it "thankyou.html". Before
you proceed to the next step, open the thankyou.html page in a text editor
or in the HTML view of a graphic editor).
Caution: The thank you page name must match the
action parameter of the <FORM> tag that you entered on the guestbook
form page. |
Step 7: Insert the mgiGuestbook tag.
- Insert your cursor before the ending </BODY> tag and enter the
beginning and ending mgiGuestbook tags. The beginning mgiGuestbook tag
has one required parameter (filelocation). In the "filelocation"
parameter, enter the name of the guestbook display page (display.html).
For example,
<mgiGuestbook fileLocation="display.html">
...the format of the guestbook entry appears here...
</mgiGuestbook>
Tip: The mgiGuestbook tag can be entered anywhere on the thankyou.html
page because it will be removed when it is processed by MGI and will not
be visible to the visitors that complete the guestbook form. |
Step 8: Format the guestbook entry with text, HTML, mgiFieldContent
tags and other MGI tags.
- Enter text, HTML (e.g., font colors), mgiFieldContent tags, and other
MGI tags (e.g., mgiDate) in the body of the mgiGuestbook tag. Each mgiFieldContent
tag displays the information from the guestbook form field that is specified
in the "name" parameter. The following is an mgiGuestbook tag,
text, HTML, mgiFieldContent tags, and an mgiDate tag that format each guestbook
entry.
<mgiGuestbook fileLocation="display.html">
<p><b><mgiFieldContent name="Name"></B> posted this
message on <mgiDate>:</p>
<BLOCKQUOTE>
My favorite Funky Jello song is
<I><mgiFieldContent name-"favorite"></I><BR>
<mgiFieldContent name-"stories">
</BLOCKQUOTE>
<p>If you want to chat with <mgiFieldContent name="Name">, send an
email to <mgiFieldContent name="Email Address">.</p>
<HR>
</mgiGuestbook>
Step 9: Save the thank you page.
- Save the changes you have made to the thank you page.
Step 10: Create a page to display guestbook entries.
- Create a new page and enter the title "Funky Jello Fan Talk".
Step 11: Save the display page and open it in a text editor.
- Save the display page and name it "display.html". Before
you proceed to the next step, open the display.html page in a text editor
(or in the HTML view of a graphic editor).
Step 12: Insert the Guestbook Insertion Marker.
- Insert your cursor after the title "Funky Jello Fan Talk"
and enter the Guestbook Insertion Marker. The Guestbook Insertion Marker
is written in the style of an HTML comment that designates where new guestbook
entries are displayed. For example,
<H3>Funky Jello Fan Talk</H3>
<!-- Guestbook Insertion Marker -->
Step 13: Save the display page.
- Save the changes you have made to the display page.
Step 14: FTP the guestbook form, thank you page and display page to
the web server running MGI.
- Upload the guestbook form, thank you page, and display page from your
local computer to the web server using an FTP program.
Step 15: Complete and submit the guestbook form and view the guestbook
entry.
- Access the guestbook form in a browser. Complete and submit the form.
After you submit the form, the thank you page with the message "Funky
Jello loves to hear from our fans. Thanks for signing our guestbook"
is displayed. Next, view the display page. Your guestbook entry will appear
similar to the following entry:
Nicole Terry posted this message on September 20, 1999:
My favorite Funky Jello song is Funk City.
During the tour, I met Funky Jello at a local IHOP after
the show. What a thrill! Every member signed my T-shirt
and even posed for a few photos. You can see them on my
web site.
If you want to chat with Nicole Terry, send an email
to nicole@terry.com.
- Each new guestbook entry is added to the display page at the location
of the guestbook insertion marker. Newer guestbook entries appear before
older guestbook entries.
|