Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
Domino forms for all (continued)

The code included here is for a generic agent that will cope with any form sent to it, using the FormMail scripts. You might wish to customize this to perform additional validation and processing or to handle different form-to-mail software. There's no reason why this agent shouldn't send off an acknowledgment email back to the original browser user, though many form-mail scripts can also handle this process. Doing it in Notes can be very simple, since the design of the message can be accomplished by creating a custom Notes form, as below in this stripped down example:

Set docReply=New NotesDocument(dbThis)
docReply.Form="Reply"
docReply.SendTo=strUserAddress
Call docReply.Send(True,True)
Delete docReply

The generic agent shown has two major drawbacks, with similar choices in solving them.

First, the generic agent can't know the datatypes of fields it receives. Everything must be saved as text. If you design a custom agent to specifically match a certain HTML form, then each field can be determined as being date, numeric, string, rich text, etc. Alternatively, you could pass the datatype of each field as hidden fields in the original form, e.g., a field called PRICE matched by a hidden field called PRICE_TYPE with a value of CURRENCY. This latter approach preserves the generic nature of the agent.

Second, the document created will retain the Memo form of the original email. You could choose to adapt the agent to hard-code the name of the Notes form that the memo will be converted to or that a new resulting document will use. However, you can also set this--as the Notes fields--on the original HTML form itself. All that's required is to create a hidden field with the name "Form" and the fixed value of the form name. This will then be passed via the email to the Notes agent and saved as a field along with the other values.

A variation
A variation on this technique can be used where you do have a Domino server on-line and want to tie in non-Domino intranet or Internet sites that have Web forms. In this case, similar code to the agent above could be used to write a Domino Web agent that mimics the form-to-mail scripts, and the address of this agent is used to replace that of the existing CGI routines used to handle the form submissions. In other words:

<FORM METHOD="Post" ACTION="http://www.myserver.com/feedback.nsf/FormToMail?OpenAgent";>

Conclusion
Domino developers have something unique to draw upon, a twin heritage of collaborative system design, with both the World Wide Web and the even older Lotus Notes groupware history. Although Lotus has intertwined these two strands successfully in the form of the Domino server, there's no reason why Notes and Internet-savvy developers shouldn't blend Notes and the Internet in various other ways to suit their differing situations.

Product availability and resources
For Matt's Script Archive section on FormMail, visit http://www.worldwidemart.com/scripts/formmail.shtml.

For the CGI Resource Index, visit http://cgi.resourceindex.com/Remotely_Hosted/Form_Processing/.

Bulk reprints
Bulk reprints of this article (in quantities of 100 or more) are available for a fee from Reprint Services, a ZATZ business partner. Contact them at reprints@zatz.com or by calling 1-800-217-7874.

Ron Herardian is CEO & Chief Systems Architect at Global System Services (GSS). You can reach Ron via email at rherardi@gssnet.com, or via his web page at http://www.gssnet.com.


« Previous  ·  1  ·  2  ·  3  ·  4
Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Home > Internet Technologies > HTML and CSS (15 articles)
   Using a reusable code approach to HTML select option lists
   One reader's opinion on HTML mailing
   Keep lookin' good with Cascading Style Sheets
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.

Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.

Learn how to easily clean up your address book.

-- Advertisement --

Integrate your Notes Applications with Microsoft Office and Symphony
Integra for Notes Integrates Microsoft Office and/or IBM Lotus Symphony
Requires NO change to the design of the appliation or Installations of DLL's and EXE's
  • Integra is a ready to use solution, enhance static reports with Excel data analysis, pivot tables, macros
  • User friendly aproach, using a point and click access to features
  • Reports from any Lotus Notes databases
  • Runs reports through a Notes client, web browser and scheduled basis
  • Allows use of LotusScript for advanced data manipulation
  • Enables self service reporting capabilities to end-users


Learn more at www.integra4notes.com.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login