Domino web forms

Chris Toohey has posted about iffy Domino-generated HTML forms:

Basically, I’m sick and tired of having Domino do the markup for me. I’ve been able to change this everywhere except for the forms. If you want to submit content via the web, you’re sorta stuck…

Not sure if I’m understanding you correctly Chris, but you can do your own forms, no problem! For example, this very site uses home-grown forms, and the hack is pretty simple: before embarking on the pass-thru HTML for your form, close off the default Domino-generated one.

That’s it.

Gotchas? Well, you need to bear in mind that document.forms[0] is already used up.


  1. Another alternative - if you are using ND6.5 (not sure if you can do this in ND6) - is to use XHTML and style the form using XSL.

    Append "&OutputFormat=xhtml10" to url's and Domino will output XHTML.

  2. See… I was purposefully being aloof until I knew that I could or couldn't do what I wanted to do: use a $$NavigatorTemplate for test.html (Treat contents as HTML) and blank test.html navigator to create a document in Domino. The $$Navigator would hold all of my form stuff, and allow me to write the form *my* way!

    The reason for this is the problems that I'm running into with a few of my applications where the base href isn't "sticking" on the Domino-generated forms (as well as a short-but-growing list of issues).

    So far, no success… but I'm still workin' on it! ;-)Chris Toohey#
  3. The base ref issue sounds weird… I use base ref code all over the place, and haven't hit any issues with it in forms yet. Odd. But then of course, one has to bear in mind that a "form" in terms of the ReadForm or CreateDocument URLs is one level higher in the URL than, say, a document.Ben Poole#
  4. I don't like reamform commands really. It just looks "bad" IMHO. I *much* prefer the blank nav and $$NavigatorTemplate approach for such a thing. Call your nav test.html and your $$NavigatorTempalte for test.html can contain all the same stuff that your testform?readform can… but can be more standards-based and more pleasing to the eyes. ;-)Chris Toohey#
  5. I "roll my own" (A Ben Poole quote from the LDD forum if I remember correctly) HTML forms.

    I cant remember the last time I used a Domino form for submitting content from the web. I just use straight HTML form submit it to a Save agent. The agent parses the HTTP_REQUEST field from the DocumentContext grabs all the fields I want and then saves a notes document with the relevant field values. There are couple of things to work around and I cannot currently upload files(Multi-part forms) but on the whole it works well and I can create XHTML 1.+ sites with no problems at all.

    Ok its not strictly Notes but its a means to an end.john marshall#
  6. I think too much is made of URLs and how they look. And it's all from developers. For example, my wife could care less about the slashes and words in the site address bar.

    Just go to the IBM site for some baaaaad URLs! — and these are derived from the platform we lowly Domino coders are supposed to aspire to? Hmm.

    Even Ned almost ended up giving himself a bad rap re Domino URLs (see this link.)

    Well, I've seen worse: at least the Domino ones make sense. Like Ned says, they constitute an API.Ben Poole#
  7. John - Sounds promising… can we get an example?!?!?

    Ben - aspire to develop like those [….]???? We collectively started one-upping them from the start. IBM/Lotus has some of the best minds in the business… using their products.

    As for the cleaner URLs, I just don't like ?Commands to get a job done. ?ReadForm and ?OpenAgent just drive me nuts. I dunno, it's half "pulling back the curtain" to your users and half the idea that someone would/could keep hitting f5 and hose up your functionality.

    Don't mind me though.. remember, this is the guy trying to get a form to submit without using a form!

    … I need a nap!Chris Toohey#
  8. Let me tentatively through in my $0.02 worth ('cos every time I mention something everybody tells me how bad it is)…

    For something basic, my approach is to construct forms out of HTML, then pass the values to a Notes form that the browser never sees. The form is saved/not saved as required, and the $$Return function used to send the user to somewhere else (eg. 'thank you' page).

    The reason I like this approach is that although there is a 'redundant' Notes form, (1) I have full control of HTML (2) it is easier than parsing values from an agent and (3) the user never has to see the complex form URLs.

    Having said that, I have also used an agent to parse form values. What a pain in the neck, but talk about control!Anura Samara#
  9. [7] Ben I have a working example which I sent to Jake Howlett and couple of years ago. Ref. I will dig it out anyone may have a copy but I dont have time for an article, so the database is all you'll get. I'll post a link to the download at the weekend at The code will be old but the principles are the same.

    Ohh and a correction to my previous post: I parse the Request_Content field not the HTTP_REQUEST field. duh.

    [8]Anura I felt the pain once and then let my code do the work. If I remember correctly it was the first useful LotusScript class I wrote.

    A cleaner version of the LotusScript class I use for parsing will be a part of my new Domino tag project ddcTagTemplate with which you will be able to roll your own XHTML 1.1 web sites as well as many other text output formats. If I ever get the time to finish that is…

    I hope this post saves correctly the preview looks strange and I have used valid HTML.
    john marshall#
  10. Thanks John. The current Javascript link parser just converts all a href tags. I should tweak that one day. In the meantime, I've tidied up the post (your HTML is just fine ;-))Ben Poole#
  11. Ben,

    heres that example you wanted. It has a bit of history so I suggest you read the links too. marshall#

Comments on this post are now closed.


I’m a software architect / developer / general IT wrangler specialising in web, mobile web and middleware using things like node.js, Java, C#, PHP, HTML5 and more.

Best described as a simpleton, but kindly. You can read more here.