|
FrontPage98 Tips |
![]() |
20. Deal with form field defaultsSome of the more advanced database integration features in FrontPage require you to use Form Field Parameters in your queries. In this case, the query is run after a user enters some information into a form field and clicks the Submit button. But what if one of your visitors hits the Submit button without entering any information first?You can get around this by specifying a default for any Form
Field Parameter required by a query. Simply open the page that contains
the database components in the FrontPage Editor and switch over to the
HTML view. Now find this part of the code:
For example, if the query is "Select * from customers" where LastName = '%%MyForm%%', in HTML view you could modify the s-DefaultFields attribute to read s-DefaultFields="MyForm=Johnson". If someone submits the form without first entering any data in the MyForm field, FrontPage will substitute in the value "Johnson" and then run the query. Related tips:
Introduction | Previous | Next |