Solved

How to address limitless number of fields on the web?

Posted on 2004-09-22
11
346 Views
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.
0
Comment
Question by:crom654
  • 4
  • 2
  • 2
  • +3
11 Comments
 
LVL 14

Expert Comment

by:p_partha
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>
</form>

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
0
 

Author Comment

by:crom654
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.

0
 

Author Comment

by:crom654
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?
0
 
LVL 19

Assisted Solution

by:RanjeetRain
RanjeetRain earned 125 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.
0
 
LVL 14

Assisted Solution

by:p_partha
p_partha earned 125 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

Partha
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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>
    <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?
0
 
LVL 3

Assisted Solution

by:Andrea Ercolino
Andrea Ercolino earned 125 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.
0
 

Author Comment

by:crom654
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):

FORM1
lastname, firstname

othernames
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?

Thanks.
0
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 125 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??
0
 

Author Comment

by:crom654
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!

0
 
LVL 31

Expert Comment

by:qwaletee
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?
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now