FP2000 - Passing hidden field value from database

  • Thread starter Thread starter Andreas
  • Start date Start date
A

Andreas

Hi,

Got a form displaying data from database, using Database Results Wizard.
Sending results to custom handler, used to update the database with
changed values.
Problem: I do not want to display the ID (as the user might change it
and update the wrong record) but still need to pass it. How can I do this?

Many regards in advance,
Andreas
 
-----Original Message-----
Hi,
Howdy.

Got a form displaying data from database, using Database
Results Wizard. Sending results to custom handler, used
to update the database with changed values.
Problem: I do not want to display the ID (as the user
might change it and update the wrong record) but still
need to pass it. How can I do this?

Define "display".

If you don't want the DRW to display the record ID, but
you do want to use it in a query string, then code your
own SQL statement that includes the ID in the result set
even though there's no matching Database Column component.

If you don't want the ID to appear even in the query
string, you would have to invent some other identity for
the records and use that.

Another approach is to require visitor login, and then
verify inyour code that the logged-in user has permission
to updated the given record.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Hi Jim,
Thanks for your reply.

The ID field is available, but because I am not displaying it in the
form, the Submit button does not pass it on.

Have tried to use a hidden field but I can not get it to use dynamic
info, it seems it can only use hardcoded values.

If I use a hyperlink, I can pass the the value but I can not (easily)
access the changed values from the form.

I am really hoping there is a simple way of getting the submit button to
do what it does normally and in addition pass the value of another
field, even if it is not visible in the form.

Thanks again,
Andreas
 
Andreas said:
Hi Jim,
Thanks for your reply.

The ID field is available, but because I am not displaying it in the
form, the Submit button does not pass it on.

Have tried to use a hidden field but I can not get it to use dynamic
info, it seems it can only use hardcoded values.

If I use a hyperlink, I can pass the the value but I can not (easily)
access the changed values from the form.

I am really hoping there is a simple way of getting the submit button to
do what it does normally and in addition pass the value of another
field, even if it is not visible in the form.

Is the DRW displaying a single database record, then? With the form
surrounding it?

In that case, modify your query to construct a hidden form field.
Here's an example:

SELECT '<input type=hidden name=recid value=' & [id] & '>' As
hiddenid, ...

Then, display the hiddenid field in the results. But after the wizard
completes, right-click the column value, choose Database Column Value
Properties from the shortcut menu, and select Column Value Contains
HTML.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Thanks Jim,

I will try this out.
This would be much better than the only other solution I have found so
far, which uses the READONLY tag in HTML. According to the site I found
it on, this tag is not very well supported.

Many thanks,
Andreas

Jim said:
Andreas said:
Hi Jim,
Thanks for your reply.

The ID field is available, but because I am not displaying it in the
form, the Submit button does not pass it on.

Have tried to use a hidden field but I can not get it to use dynamic
info, it seems it can only use hardcoded values.

If I use a hyperlink, I can pass the the value but I can not (easily)
access the changed values from the form.

I am really hoping there is a simple way of getting the submit button to
do what it does normally and in addition pass the value of another
field, even if it is not visible in the form.


Is the DRW displaying a single database record, then? With the form
surrounding it?

In that case, modify your query to construct a hidden form field.
Here's an example:

SELECT '<input type=hidden name=recid value=' & [id] & '>' As
hiddenid, ...

Then, display the hiddenid field in the results. But after the wizard
completes, right-click the column value, choose Database Column Value
Properties from the shortcut menu, and select Column Value Contains
HTML.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Back
Top