Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Help with custom post fields
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

StephenD
Senior Member

Australia
1044 Posts

Posted - 09 June 2003 :  00:50:59  Show Profile  Send StephenD a Yahoo! Message
Following on from the topic here:
http://forum.snitz.com/forum/post.asp?method=TopicQuote&TOPIC_ID=41216&FORUM_ID=25
I'd like to add custom fields to post.asp and write the result in the message body without adding the Events Calendar Mod. I've gotten only so far and need help linking the information posted into the message text body.

Here is a pic of how my post.asp looks like at the moment: www.global-e.com.au/scrshot.jpg

Here are text versions of my post.asp and post_info.asp:
www.global-e.com.au/post.txt
www.global-e.com.au/post_info.txt

All help would be sincerely appreciated..
Regards

Steve D.
Average Member

USA
640 Posts

Posted - 09 June 2003 :  10:14:13  Show Profile  Visit Steve D.'s Homepage  Send Steve D. a Yahoo! Message
So what part are you having problems with? I'm assuming by your screen shot that you have the post.asp additions working.

As for the post_info.asp

search for this
		txtMessage = ChkString(Request.Form("Message"),"message")
		txtSubject = ChkString(Request.Form("Subject"),"SQLString")


and replace with

	'#### Steve D.'s Event Add On ####	
		dim EventMessage
		EventMessage = "Location:  " & Request.Form("event_Location") & vbNewLine
		EventMessage = EventMessage & "Time:  " & Request.Form("event_StartTime") & " - " & Request.Form("event_EndTime") & vbNewLine
		EventMessage = EventMessage & "Cost:  " & Request.Form("event_Cost") & vbNewLine
		EventMessage = EventMessage & "Website:  " & Request.Form("event_Website") & vbNewLine

		txtMessage = ChkString(EventMessage & vbNewLine & Request.Form("Message"),"message")
	' #####################################################
	txtSubject = ChkString(Request.Form("Subject"),"SQLString")


That should work, or need some slight tweaking

Swing Dancing Video Clips - It's All Swing! Forum
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 09 June 2003 :  18:42:42  Show Profile  Send StephenD a Yahoo! Message
Thanks Steve

This is the code I've used which is causing an internal server error 500.

'**************CUSTOM POST FIELDS STEVE D ************
				dim CustomerMessage
				CustomerMessage = "Mailing Address:  " & Request.Form("mailing_address") & vbNewLine
				CustomerMessage = CustomerMessage & "Postal Code:  " & Request.Form("postal_code") & vbNewLine
				CustomerMessage = CustomerMessage & "Phone Number:  " & Request.Form("phone_number") & vbNewLine
				CustomerMessage = CustomerMessage & "Cheque Value:  " & Request.Form("cheque_value") & vbNewLine
				CustomerMessage = CustomerMessage & "Pay Cashback:  " & Request.Form("pay_cashback") & vbNewLine

				txtMessage = ChkString(CustomerMessage & vbNewLine & Request.Form("Message"),"message")
				end if
'******************************	   
               txtSubject = chkString(Request.Form("Subject"),"SQLString")


I haven't got the events calendar mod installed. Do I need to do something with the "dim Customer"?
Regards

Edited by - StephenD on 09 June 2003 19:37:55
Go to Top of Page

Steve D.
Average Member

USA
640 Posts

Posted - 09 June 2003 :  23:09:28  Show Profile  Visit Steve D.'s Homepage  Send Steve D. a Yahoo! Message
In Internet Explorer go to Tools > Internet Options > Advanced > Show Friendly HTTP errors and make sure it is not checked. Then see what the exact error is.

What do you mean dim Customer? I only see dim CustomerMessage...

Swing Dancing Video Clips - It's All Swing! Forum
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 09 June 2003 :  23:25:11  Show Profile  Send StephenD a Yahoo! Message
Hi Steve

This is the error message:
Microsoft VBScript compilation error '800a0400' 

Expected statement 

/forum2/post_info.asp, line 732 

end if
^


This is the block of code around it:
		Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Was A Problem With Your Details</font></p>" & vbNewLine & _
				"      <table align=""center"" border=""0"">" & vbNewLine & _
				"        <tr>" & vbNewLine & _
				"          <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
				"        </tr>" & vbNewLine & _
				"      </table>" & vbNewLine & _
				"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Go Back To Enter Data</a></font></p>" & vbNewLine
	end if
end if


Sorry, I meant dim CustomerMessage...
Go to Top of Page

Steve D.
Average Member

USA
640 Posts

Posted - 09 June 2003 :  23:30:12  Show Profile  Visit Steve D.'s Homepage  Send Steve D. a Yahoo! Message
txtMessage = ChkString(CustomerMessage & vbNewLine & Request.Form("Message"),"message")
end if

take out that end if.

You are taking CustomerMessage and adding it to the message field.

Swing Dancing Video Clips - It's All Swing! Forum
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 09 June 2003 :  23:44:14  Show Profile  Send StephenD a Yahoo! Message
Thanks, I don't get the error message anymore but the code is still not been added to the message field.
Go to Top of Page

Steve D.
Average Member

USA
640 Posts

Posted - 09 June 2003 :  23:52:05  Show Profile  Visit Steve D.'s Homepage  Send Steve D. a Yahoo! Message
IM me

Swing Dancing Video Clips - It's All Swing! Forum
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07