INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

FORMS

FORMS

(OP)
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.

RE: FORMS

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.
http://behindtheweb.blogspot.com/
 

RE: FORMS

(OP)
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!

RE: FORMS

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.
http://behindtheweb.blogspot.com/
 

RE: FORMS

(OP)
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.

RE: FORMS

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.
http://behindtheweb.blogspot.com/
 

RE: FORMS

(OP)
I posted the pages to the server for testing -
Webpage error details

Message: Object expected
Line: 98
Char: 1
Code: 0
URI: http://www.mywebsite.com/meetings

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close