How to address limitless number of fields on the web?

Posted on 2004-09-22
Medium Priority
Last Modified: 2013-12-18
I will be creating web forms for people to fill out on the web (using information derived from a FoxPro database). The number of fields used per record could be 10 or limiitless.  From what i"ve read I will need to use multiple documents per record, but I don't want to do this so I"m hoping some one can suggest a better alternative.

I thought about using the Request_Content CGI variable. I figured I could have a LS agent create 1 Notes document per record, and just write HTML form fields for each field, then use the Request_Content field to grab all the on a post agent run (on submit), then save this info as HTML. But it looks like this method won't work because of size issues.

Some guy has a fascinating solution on Notes.net using Javascript; but we cannot use that here for political reasons.

It seems like there should be some way to do this without using multiple Notes documents per record, because it doesn't even matter if this info is in Notes fields, as long as the outside folks can validate and  fill in the web forms, and the inside folks can see what the outside folks have done. Is there something that can be done? What is the best way to handle this?

Thanks for any help.
Question by:crom654
  • 4
  • 2
  • 2
  • +3
LVL 14

Expert Comment

ID: 12128082
You must be able to accomplish this using Post method.

somethign in this lines:

<form method =post action ='http://<servername>/databasename/<youragentname>?openagent>
<all your fields>

when you submit it calls the agent in teh action attribute

In the agent

dim session as notessession
dim doc as notesdocument
set doc = session.documentcontext
forall x in doc.items
msgbox x.value
end forall

Author Comment

ID: 12128215
Thanks, but everything I've read indicates that this won't work with HTML fields unless there is also a corresponding Notes field on the form.

In order to use your solution I would need to use the Request_Content CGI variable to get all HTML fields in the agent. But as I said, this has size limitations.


Author Comment

ID: 12128328
I'm sorry, I'm not being clear. What I have here is a situation where I don't know how many fields I'll need, so my options appear to be to use HTML fields (if possible) or use response documents  to display the surveys.

Or maybe there is some other way to handle a possibley limitless number of fields?
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

LVL 19

Assisted Solution

RanjeetRain earned 375 total points
ID: 12128608
>> Or maybe there is some other way to handle a possibley limitless number of fields?

Yes, redesign your form. No, not a make up. Break down your form in more logical and cohesive components.

Clearly, you can't have unlimited fields, so to sya. If I know your exact requirement, possibly I can suggest you something more.
LVL 14

Assisted Solution

p_partha earned 375 total points
ID: 12129435
Ok here are the options i get in my mind...

a. write a java servlet, which will send a mail to a mailindatabase, create a document from there
b. in the code i gave above try changing the acction to something like this:
<form method =post action ='http://<servername>/databasename/<yourformname>?createdocument>

make sure you have alll the fields in that form with the same name as this html

i would prefer option b as it is easy and implementable

LVL 46

Expert Comment

by:Sjef Bosman
ID: 12131372
Something along the lines of Partha's suggestion, although this one is ugly but it will work. It is possible to generate a form using HTML with an agent or in a Notes-form. One record-type can be defined in a record description document. The form will behave exactly as a Domino-generated form, although the HTML will be different. The code is not too difficult, and you have to decorate your form with some passthru-HTML. The Domino HTTP-server generates <form>...</form> for you around your form, so you have to start your form with:
    <form name=something method=post action='....../database.nsf/newformname?createdocument&option=value......'>
Domino will generate the closing </form> for you. The first part of the page will be the Domino-form where there should be no input-fields! The second part will consist of the form generated by you, with all the inputfields. You have to give all these fields a fixed, internal name, but these names can be renamed later on.

Now the really difficult part. Notes indeed needs every field to be present in the receiving form (here 'newformname'). There are two options:
- define a maximum number of fields supported this way, and define every field in the receiving form; I use field_1 .. field_50 for this purpose, i.e. a max. of 50 fields
- piggyback field-data if possible, using JavaScript (politically incorrect??)

There is more to it, but would it be possible to use this?

Assisted Solution

by:Andrea Ercolino
Andrea Ercolino earned 375 total points
ID: 12131900
Really I can't understand what's the point...

You said "I will be creating web forms for people to fill out on the web".
Does this mean that you will create NotesForm design documents in Notes Designer and then other people will create documents online using your forms? If if it is this way then there is no problem at all: just create a form for every table in the relational database and customize it to properly show in an internet browser.

Author Comment

ID: 12132004
Thanks everyone for the responses!

The point of this is to provide web users with data from the tables that they can validate and change, then submit back to the server where Notes users will validate any changes made. Sure, I can do this with multiple Notes documents per form, and I probably will end up doing that, but there are in some cases multiple records per form in each table, and I wanted to make this as easy as possible for the web users to view, edit, and submit the data presented to them.

Since I cannot know how many Notes fields I will need for each form, and using javascript on my html form to combine field values into preexisting Notes fields is not going to happen, it looks like this is the way to go (though the servlet idea seems intriguing...).

Here is a rough sketch of how the data looks (it's obviously more complicated):

lastname, firstname

lastothername1 lastotheraddress1
lastothername2 lastotheraddress2
lastothername3 lastotheraddress3
lastothername4 lastotheraddress4


So I guess  I need to have the 'lastothername' field(s) in a seprate form, perhaps a response to the parent (with lastname, firstname fields)? This way there can be as many lastothername\lastotheraddress sets of fields as needed? Or is there a better way to organize these fields in Notes forms?

LVL 46

Accepted Solution

Sjef Bosman earned 375 total points
ID: 12132195
So if I understand you correctly, you want the web-user to be able to enter 10000 names and addresses per form, if necessary? The poor sod... Before he gets the chance to enter the data his PC will have crashed 4 times, he made numerous mistakes, he had the order wrong, etc. This requirement is likely to be a burden in the end.

A document per name/address record is unpractical, because it requires forms to be loaded over and over again to add a record. Do you plan to allow the web-user to modify or delete the document he created? How will you do that??

If you want to see an example of a generated form the way I described above, go to http://www.dromecentre.com/web/cdl/cdl.nsf/pages/inforequk
This page is an internal page of the framed website, therefore the look may not be as it should, but you can get an idea this way. Skip the JavaScript at the top, it's for the menu only.

The servlet approach won't work for you. The number of forms entered will be similar only the place to deal with the problem will be different. An applet though might do some good, for all the processing will then happen in the browser. Is Java permitted??

Author Comment

ID: 12132493

Here's the deal: the records are being brough in to Notes from dbfs, so there can potentially be unlimited sets of fields, but the web user never creates them; she just sees the ones that apply to her on the web, validates and if necessary changes them, then submits them. I want the form taht the user gets to be one web page if possible, then she can check and fill in the fields, then submit it. But if I must use multiple Notes documents per form, she will have to check some fields, then click a 'next' button or something like that, then check some more, then click a 'next' field... then eventually submit. I can do that but it seems to have a lot of pitfalls so i was hoping for a way to do it all with one form.

I'll take a look at your example, thanks so much!

LVL 31

Expert Comment

ID: 12133099
Let's see, there are several solutions, but each is unacceptable to you for various reasons.  There are no solutions left.  Ergo, one of your requirements will have to give.  Javascript, multiple records, usinga servlet, or backing away from Domino altogether.

Which will it be?

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
The video provides a quick and easy steps to migrate MBOX file to well known Outlook PST and Office 365. Besides this, it also supports and migrates more than 20 email clients of MBOX which include AppleMail, Opera, Thunderbird and SeaMonkey effortl…
Did you know PowerShell can save you time with SaaS platforms? Simply leverage RESTfulAPIs to build your own PowerShell modules. These will kill repetitive tickets and tabs, using the command Invoke-RestMethod. Tune into this webinar to learn how…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question