Seminar Registration

1. Member
Join Date
Dec 1969
Posts
83

## Seminar Registration

Hi there,<BR><BR>I&#039;ve created a form for users to register for a seminar. There can be 7 max. The price of the seminar is \$99. If 2-7 people sign up, how do I get the total to automatically calculate when they submit the form? In other words, if there are 4 people, do I need an array then calculate the total with the result of the array? Any thoughts would be greatly appreciated. Thanks!

2. Senior Member
Join Date
Dec 1969
Posts
570

## a little direction...for me

could you specify how you&#039;re getting the information of how many people would be attending the seminar? is it a drop down menu, seven separate applications in one form, etc?

3. Member
Join Date
Dec 1969
Posts
83

## RE: a little direction...for me

Thanks. It&#039;s one form with seven different input boxes for names. I have a big "if" statement where it looks for a value returned from those boxes (if strRegCalc1&#062;"" and strRegCalc2="" then<BR>strTotal=strRegCalc1)<BR>etc. and then multiplies the fee based on how many boxes were filled in. It works fine, but it&#039;s clunky. I thought there was possibly a more streamlined way to do it. Thanks again.

4. Senior Member
Join Date
Dec 1969
Posts
570

## a function, possibly?

this is all i could really think of...tell me if it suits your needs:<BR><BR>&#060;%<BR>txt1=request.form("txt1") <BR>txt2=request.form("txt2")<BR>txt3=request.form ("txt3")<BR>txt4=request.form("txt4")<BR>txt5=requ est.form("txt5")<BR>txt6=request.form("txt6")<BR>t xt7=request.form("txt7")<BR>mynum=0<BR>mynum=numpe ep(txt1,mynum)<BR>mynum=numpeep(txt2,mynum)<BR>myn um=numpeep(txt3,mynum)<BR>mynum=numpeep(txt4,mynum )<BR>mynum=numpeep(txt5,mynum)<BR>mynum=numpeep(tx t6,mynum)<BR>mynum=numpeep(txt7,mynum)<BR>function numpeep(txtnum,mynum)<BR>if txtnum&#060;&#062;"" or not isnull("txtnum") then<BR>mynum=mynum+1<BR>else<BR>mynum=mynum<BR>en d if<BR>numpeep=mynum<BR>end function<BR>%&#062;<BR><BR>i hope this is what you&#039;re looking for!

5. Senior Member
Join Date
Dec 1969
Posts
2,493

## RE: a little direction...for me

give all the fields the same name<BR><BR>&#060;form action="thenextpage.asp" method="post"&#062;<BR>&#060;input type="text" name="signup"&#062;&lt;br&gt;<BR>&#060;input type="text" name="signup"&#062;&lt;br&gt;<BR>&#060;input type="text" name="signup"&#062;&lt;br&gt;<BR>&#060;input type="text" name="signup"&#062;&lt;br&gt;<BR>&#060;input type="text" name="signup"&#062;&lt;br&gt;<BR>&#060;input type="text" name="signup"&#062;&lt;br&gt;<BR>&#060;input type="text" name="signup"&#062;&lt;br&gt;<BR>&#060;input type="submit value="Submit"&#062;<BR>&#060;/form&#062;<BR><BR>on the nextpage<BR><BR>Dim tSignups<BR>Dim tCount<BR>Dim sCost<BR>tSignups=split(request("signup"),",")<BR> sCost=99<BR>for i = 0 to ubound(tSignups)<BR> if Len(Trim(tSignups(i)) &#062; 0 Then<BR> Tcount=tCount + 1<BR> End If<BR>Next<BR><BR>TheTotal= FormatCurrency(sCost * CInt(Tcount))<BR><BR><BR>

6. Member
Join Date
Dec 1969
Posts
83

## RE: a function, possibly?

Thanks, I&#039;ll give that a try.<BR><BR>Deb

7. Member
Join Date
Dec 1969
Posts
83

## RE: a little direction...for me

I&#039;ll try this one too. Thanks greatly to all of you.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•