Use a custom Frontier script to display a form and parse its cont ents WAS: RE: email forms, Manila

Roland Tanglao rtanglao at e-xact.com
Tue May 6 16:51:53 PDT 2003


Sorry for my late reply.

Another possible way to do this is to write a custom Frontier script which
displays the form and parses the content and then emails.

Dave has posted some excellent sample Frontier code which displays a form,
parses the form response after you hit submit and then emails some results.

Check out my post about it on my blog at:
http://www.rolandtanglao.com/2003/03/31.html#a3956

Hope that helps!
--
...Roland rtanglao at e-xact.com (M-Th) roland at rolandtanglao.com (7 days a
week!) 
604 729 7924 RolandTanglao.com VanEats.com 
www.blogue.com/disruptiveThinking


-----Original Message-----
From: frontier-users-admin at userland.com
[mailto:frontier-users-admin at userland.com]On Behalf Of Peter Thirkell
Sent: Friday, May 02, 2003 2:05 PM
To: Frontier-Users
Subject: Re: email forms, Manila


Re:
> Nope, that's not what I want to do. I want a visitor to my site to be
> able to fill out a form (name:, telephone number:, choose something from
> a menu) and click on a "send" button and have the form sent to an email
> address that I've built into the page.

I do this and it runs perfectly. Check out the following which should give
you most of what you need to get this going:

http://frontier.userland.com/stories/storyReader$81

When done within Manila there's a bit of an issue about where the scripts
etc get stored. In my case I first set up the form right within a new Manila
stories page using "Edit this page" - example script fragment below:

[Normal text stuff - eg] ... please complete the following Registration Form
to enjoy your membership privileges and confirm your subscription to the xyz
Journal -

<form name="form1" method="post" action="response">
<table>
  <tr><td>Title</td><td>
    <input type="text" name="Title" size="15"></td></tr>
  <tr><td>Surname</td><td>
    <input type="text" name="Surname" size="30"></td></tr>
</table> 
<p><p><b> Please check your details carefully and then submit - remember to
only click the submit button once.</b> After clicking you will be taken to
another page containing details about where to send your completed
application form and payment.<p><p>
<input type="submit" value="Submit Registration"><p>
</form>

When the "Submit Registration" button is clicked it looks for the "Response"
WP-text item within the stories subtable of the specific site table within
ManilaWebsites.Root. In that text page you have something like the following
text fragment to build the response page:

#Title "Membership Application"
<p>
Please now print off a copy of this registration form, include your payment,
and mail the form to: blah blah

NB: You will receive email notification of full membership and also be
subscribed upon receipt of payment. Many thanks for your support, and
welcome.
<p>
{HandleForm ()}

The "HandleForm" script needs to be placed within the #Tools subTable of the
specific site table within ManilaWebsites.Root. I also place the "SendEmail"
script in the same place.

If you want you can also store the applicant data in a subTable somewhere.
This is a good precaution for auditing and tracking what's actually going on
and recording the data from whoever submits a form. I store everything on
one place but I presume you could record the info as a part of member
details as well?! (if anyone does this I would be interested in seeing a
script fragment please). The reason I don't do in this case is because
non-members can complete and submit application form as well as members (in
this sense it's not like the usual member.prefs situation where data is
recorded when members sign up).

This may not be the most elegant solution but it works perfectly for me.

cheers

Peter Thirkell



More information about the Frontier-Users mailing list