Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

1 Form, selected inputs to selected mailto's

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
GB
Can this be done? A single form having for example 3 combo boxes. Each combo box is designated in the form layout as being the answer to be submitted to 3 different mailto email address's.
Or can it only be done with 3 seperate form pages. Thanks
 
I think it can be. If you explain in more detail, we might be able to give you better information.
 
Thanks Vragabond. I've moved on a bit since posting, but trying to find another answer. If I have three form pages, each with their own submit mailto buttons each being to different mailto email address's, is there a way to have 1 submit button which passes an onclick event to all three submit buttons, or carries the function to pass Form1,Form2,Form3 submit actions. I might not go down this road, instead put a submit or exit button on each form whereby
they cannot leave and overlook submitting from a form to go to another form. Hope I have not confused you. Its like having 3 companies products each with a form to respond back, the danger is that you leave 1 form after selecting items to go to another form and forgetting to subit on the first form. Can't explain it any better. Thanks
 
Ok, I don't think I follow you. One option is that you have three pages with forms on them in succession. Every form page when submitted sends its information and progresses onto another page. Having a button to submit all three is possible via JavaScript in this instance, however it is foolish, since user will not have filled out other forms before they are submitted. If all three forms are filled with the same information and only the emails are changing, having three forms is superflous and there are much better and simpler methods, execution of which depends on the language you are using.

The other possibility is that you have three frames with the forms. Again, it is possible via JavaScript to submit all three forms by using just one button but again, if it is the same information in all three forms, the usage of three forms is not advisable. If not for anything else, to spare the users of having to fill out same information three times.
 
Thanks Vragabond. 3 Form pages are all different. Imagine each containing a list of items to select, and being items from 3 seperate companies. The user might select 1 form, forget to submit his order/email and go onto another form where he selects items and emails if off. He then goes away from his PC, thinking all is well, but he missed submitting the first page/form. Hope thats a bit clearer, thanks
 
I still don't know if I fully understand... Your form pages appear in succession, one after another. Why cannot you simply make it compulsory for the person to see the next form in the series by submitting the first form. This way you won't have to worry about things like that.
 
Thanks Vragabond. There are two active frames. Frame 1 has buttons to select 1-3 forms to appear in the central 2nd frame. A user can scroll up and down a form selecting combo values (indicating quantites required of each item). On each form page there is a submit button to email off the values of that form to a company. I need to be able to prevent a button being pressed on the left page which would display another form - that is if an item has been selected on the current form. They may have gone to the form, had a look and not selected anything, in that case they can select another form.
All I can think is when they press any of the submit buttons, a value is logged and then cleared if submission carried out. If not the value would prevent viewing another form?
Regards
 
All of this is possible via a little bit of JavaScript. However, the question is, would you want to complicate things over and over or would you rather look for another solution. I think you're standing too close to the tree to see the forest. There must be a better way of achieving this. Looking at your problem from my perspective, I have the following questions/concerns:

1. Internet applications are not continuous. You request a page, the request is processed by the server and then the connection between the user and server is lost. Only when a new page is requested does this connection re-establish again, to perform given tasks. Saying that, forcing people to finish the form they have selected does little to nothing for you. They can still close their browser or simply type in another URL in their address bar. You cannot fight against that. Since connection is lost when the page is served, no matter what users select in the form, if it is not submitted, the value will be lost. Your idea impedes the users' usual routine and might not be appreciated by all.

2. You say that all three forms have to be submitted, however you are using three buttons which are available to switch between forms, confusing the users, since that usually means options rather than necessities. So I would reconsider this approach and go down another way:
a) have three pages called consecutively -- this will ensure that all data is properly sent;
b) have one giant form with all three pages separated by fieldsets (that's what they are there for);
c) have one giant form but play with the display: none and display: block properties for hiding/showing three separate parts.
All these solutions will give you better control over what you're trying to do. If you have three consecutive pages, you can send all the information on the last page and use the submits on the first two only to carry information over. If you use one of the latter two options, you can have a javascript validation (and a server-side one), making sure users don't forget to fill out everything.

All in all, I think you're at the time where you need to step back and ask yourself: What should happen? rather than asking yourself How could I fit my idea in this framework. If you can't figure it out, tell us what should happen and maybe we can help you find the best possible solution not just make this current solution work.
 
Thanks Vragabond, a lot of what you say makes sense. I will look at the concept of field sets. The Java road always worries me as a lot of people I know disable it. Is there a limit of how long a page can be, and controls. Obviously it will start loading slow I wouls imagine, but is there any rule? Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top