Public viewable results of forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

My family is hosting a Holidaty party and asking guests to bring menu items.
I would like to create a form where as a person can enter their name and then
a menu item which they are bringing. I would like the results saved to the
page so that the next people see the changes and what eveyone else has
committed to bring (so as not to duplicate menu items).

Is this capable of doing? I have created the page and have been playing
around with the forms fields but cannot seem to get it to work.

Thanks!
 
You could do this with a database and some ASP code but that's probably more
work than you want. Try making a guestbook (File, New, More Page Templates,
GuestBook). That way they can enter menu items and everyone will see them
when they view the guestbook. That should fit your needs.
 
Great..I did that and it will work fine thanks!

One question though, Is there a way to access and edit/clear the log if need
be? Like if someone changes their mind. I did a test and unfortunately it
saved the jargon I placed in there as test comments.
 
Mike said:
Great..I did that and it will work fine thanks!

One question though, Is there a way to access and edit/clear the log
if need be? Like if someone changes their mind. I did a test and
unfortunately it saved the jargon I placed in there as test comments.

Hmm,
What you probably need is to delete specfic entries.

I have set up a guesbook on my site with View, Search, Add, Update and
Delete. But after some experimentation with the Wizard, I stopped using it
and set up the code myself.

Does the Wizard have an option for Delete Entry?

If not, I could try to post some code here. What you need to do is to
identify the ID of the record you want to delete and pass this ID via a form
to code like this
Or, if there is only one record, you could hard code the ID, e.g.
Change
lngRecordNo = CLng(Request.Form("id"))
to
lngRecordNo = 1
if 1 is the ID of the test record


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Guestbook Delete Entry</title>
</head>
<body>
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsDeleteEntry 'Holds the recordset for the record to be deleted
Dim strSQL 'Holds the SQL query for the database
Dim lngRecordNo 'Holds the record number to be deleted
'Read in the record number to be deleted
lngRecordNo = CLng(Request.Form("id"))
'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
'Open the connection
adoCon.Open Application("guestbook_ConnectionString")
'Create an ADO recordset object
Set rsDeleteEntry = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT Results.* FROM Results WHERE ID=" & lngRecordNo
'Set the lock type so that the record is locked by ADO when it is deleted
rsDeleteEntry.LockType = 3
'Open the recordset with the SQL query
rsDeleteEntry.Open strSQL, adoCon
'Delete the record from the database
rsDeleteEntry.Delete
'Reset server objects
rsDeleteEntry.Close
Set rsDeleteEntry = Nothing
Set adoCon = Nothing
%>
</body>
</html>
 
FrontPage guestbook does not use a database. All entries have to be
edited by hand by the webmaster.
A database solution will be required to allow guests to amend entries.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/
http://www.rxs-enterprises.org/fp



Mike said:
Great..I did that and it will work fine thanks!

One question though, Is there a way to access and edit/clear the log
if need be? Like if someone changes their mind. I did a test and
unfortunately it saved the jargon I placed in there as test comments.

Hmm,
What you probably need is to delete specfic entries.

I have set up a guesbook on my site with View, Search, Add, Update and
Delete. But after some experimentation with the Wizard, I stopped using it
and set up the code myself.

Does the Wizard have an option for Delete Entry?

If not, I could try to post some code here. What you need to do is to
identify the ID of the record you want to delete and pass this ID via a form
to code like this
Or, if there is only one record, you could hard code the ID, e.g.
Change
lngRecordNo = CLng(Request.Form("id"))
to
lngRecordNo = 1
if 1 is the ID of the test record


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Guestbook Delete Entry</title>
</head>
<body>
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsDeleteEntry 'Holds the recordset for the record to be deleted
Dim strSQL 'Holds the SQL query for the database
Dim lngRecordNo 'Holds the record number to be deleted
'Read in the record number to be deleted
lngRecordNo = CLng(Request.Form("id"))
'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
'Open the connection
adoCon.Open Application("guestbook_ConnectionString")
'Create an ADO recordset object
Set rsDeleteEntry = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT Results.* FROM Results WHERE ID=" & lngRecordNo
'Set the lock type so that the record is locked by ADO when it is deleted
rsDeleteEntry.LockType = 3
'Open the recordset with the SQL query
rsDeleteEntry.Open strSQL, adoCon
'Delete the record from the database
rsDeleteEntry.Delete
'Reset server objects
rsDeleteEntry.Close
Set rsDeleteEntry = Nothing
Set adoCon = Nothing
%>
</body>
</html>

--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
 
for the basics the db interface wizard might help, or it might be overkill
for such a purposes as this.

Ronx said:
FrontPage guestbook does not use a database. All entries have to be
edited by hand by the webmaster.
A database solution will be required to allow guests to amend entries.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/
http://www.rxs-enterprises.org/fp



Mike said:
Great..I did that and it will work fine thanks!

One question though, Is there a way to access and edit/clear the log
if need be? Like if someone changes their mind. I did a test and
unfortunately it saved the jargon I placed in there as test comments.

Hmm,
What you probably need is to delete specfic entries.

I have set up a guesbook on my site with View, Search, Add, Update and
Delete. But after some experimentation with the Wizard, I stopped using
it
and set up the code myself.

Does the Wizard have an option for Delete Entry?

If not, I could try to post some code here. What you need to do is to
identify the ID of the record you want to delete and pass this ID via a
form
to code like this
Or, if there is only one record, you could hard code the ID, e.g.
Change
lngRecordNo = CLng(Request.Form("id"))
to
lngRecordNo = 1
if 1 is the ID of the test record


<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Guestbook Delete Entry</title>
</head>
<body>
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsDeleteEntry 'Holds the recordset for the record to be deleted
Dim strSQL 'Holds the SQL query for the database
Dim lngRecordNo 'Holds the record number to be deleted
'Read in the record number to be deleted
lngRecordNo = CLng(Request.Form("id"))
'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
'Open the connection
adoCon.Open Application("guestbook_ConnectionString")
'Create an ADO recordset object
Set rsDeleteEntry = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the
database
strSQL = "SELECT Results.* FROM Results WHERE ID=" & lngRecordNo
'Set the lock type so that the record is locked by ADO when it is deleted
rsDeleteEntry.LockType = 3
'Open the recordset with the SQL query
rsDeleteEntry.Open strSQL, adoCon
'Delete the record from the database
rsDeleteEntry.Delete
'Reset server objects
rsDeleteEntry.Close
Set rsDeleteEntry = Nothing
Set adoCon = Nothing
%>
</body>
</html>

--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
 
Back
Top