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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FORMS 1

Status
Not open for further replies.

Evil8

MIS
Mar 3, 2006
313
0
0
US
Okay I don't do a lot with forms, but I have been tasked with adding a list of meetings and have clients RSVP to a particular meeting. The list of meetings is long with multiple places, dates and times.

I could just put up a simple form and let the client/user just type in the information, but our clients are elderly and if I thought that it would be helpful to possibly put a check box next to each meeting and once checked would forward to a RSVP page and have the meeting information prepopulate the RSVP form. From there the info gets emailed back to the office.

What are other people doing? And/Or how do I get the meeting information on one webpage (meetings.html) to populate on the RSVP web page (rsvp.html)?

Thank you.
 
There are many ways, but it would depend o what is available to you.

For instance using JS you could create an array with all the information of all the meetings and use that to populate the next page.

Have a database that contains the meeting information, and draw from that via an Id number for the meeting, or some unique identifier to retrieve the desired information via server side language.

Using hidden form values you could send the required information over to the next page.

There are other more complex ways, but without knowing your setup its hard to offer any more suggestions.

BTW, I would assume that you would need to have a way of tracking which meetings the particular user has RSVP'ed to?



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Thank you for your help. I am most familar with javascript. I've used it doing adobe acrobat form programming, but not so much on the web. We are not hosting our own website so I don't have too much flexability. There is MySql Client and PhpMyAdmin tools there, but I've not needed to use them before. I'm sure I could figure it out if needed.

Pondering my problem I was thinking, "what if I use radiobuttons named "meetingInfo" next to each meeting on the Community Meeting page (Form name="meetings") and onClick moved the user to the rsvp page passing the value of that particular radiobutton." Does this sound easy?

I just want the user to be able to:
1 - choose which meeting they want to attend
1a - foward the user to rsvp page
1b - use the meetingInfo as text on the rsvp page
2 - ask them a couple of additional questions such as firstName, lastName, phone, email
3 - send all the info to the meeting speaker - Email?

Thanks again!
 
That should be simple enough with JS.

For instance if you have say:

Code:
<form name="meetingx" action="RSVPform.html" method="POST">
<input type=radio name="meetings" value="Meeting X" onClick="goToRsvpForm(this);">
<input type="hidden" name="MeetingTitle" value="Meeting X">
<input type="hidden" name="MeetingDate" value="xx/xx/xxxx">
<input type="hidden" name="MeetingTime" value="xx:xxpm">
<input type="hidden" name="MeetingPlace" value="Great Hall, Room X">
<input type="hidden" name="MeetingDesc" value="We will discuss...">
</form>


<form name="meetingx" action="RSVPform.html" method="POST">
<input type=radio name="meetings" value="Meeting Y" onClick="goToRsvpForm(this);">
<input type="hidden" name="MeetingTitle" value="Meeting Y">
<input type="hidden" name="MeetingDate" value="xx/xx/xxxx">
<input type="hidden" name="MeetingTime" value="xx:xxpm">
<input type="hidden" name="MeetingPlace" value="Other Hall, Room Y">
<input type="hidden" name="MeetingDesc" value="We will discuss...">
</form>


<script type="text/javascript">
function goToRsvpForm(RObj){
RObj.form.submit();
}


</script>

That will submit the selected info to the other page. you could then use PHP to populate the inputs, or change the action of the form to GET and use JS to populate the information as needed.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Okay I have a dozen of these meetings programmed on the meetings.html page. Where should I put:

Code:
<script type="text/javascript">
function goToRsvpForm(RObj){
RObj.form.submit();}

</script>

I currently have it above the closing /head tag.

On testing the onClick does not work(I get error on page):
what should the action="RSVPForm.html do? Should it refer to the rsvp.html page or the RSVPForm Form on rsvp.html page?

Can you get me started on the javascript or php for the RSVPForm?

I'm going to have to learn the MySQL and phpMyAdmin or this is going to get downright tedious... LOL.

Again thank you for your help. I'll be gone here for the rest of the day, but I'll be hard at it in the morning.
 
The JS part is fine in the header, and you only need it once there.

As far as the error on page goes, I'd need to know what the error is. Double Click on the yellow shield icon on the bottom left side of the browser window to get a more descriptive error.

the action="RSVPform.html" points to the page that holds your RSVP form.

For the PHP bit if that's the route you want to take you can do something like the following in your rsvp form page.
NOTE: you'll probably have to change the rsvp form page to a PHP page for the PHP to run. So just change the .html extension to .php

Code:
<?PHP
/* Check that the form was indeed submitted, so you when trying to use other values from it, you don't get errors. Using the clicked radio button is the easiest way */
if(isset($_POST['meetings'])){


$display=<<<EOD

<span>Meeting:</span><span>$_POST['MeetingTitle']</span><br>
<span>Meeting:</span><span>$_POST['MeetingDate']</span><br>
<span>Meeting:</span><span>$_POST['MeetingTime']</span><br>
...
EOD;

}
else {
$display="No Meeting Info found, go back and select a meeting to RSVP";

}


echo $display;



?>

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
I posted the pages to the server for testing -
Webpage error details

Message: Object expected
Line: 98
Char: 1
Code: 0
URI:
At this point they want pages up and told me to just put up a static meeting page and forget about the rsvp page. I will do that but I'm still going to continue to learn the javascript, sql and php tools to do this. They are skill sets I really need. Thank you for all your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top