Print Page | Close Window

Order Problem

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=4933
Printed Date: 30 March 2026 at 3:03pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Order Problem
Posted By: rock
Subject: Order Problem
Date Posted: 11 August 2003 at 1:32pm

I have made a script for request forms that just takes anything passed to it and send it via CDONTS.  The problem I have encountered is that the order the items are displayed in are really weird. I was wondering if anyone knows how to order this.

  Dim varRequestVariables, varRequestVariablesKeys
  Set varRequestVariables = CreateObject("Scripting.Dictionary")
  For each InputField in Request.Form
    For each InputValue in Request.Form(InputField)
      If varRequestVariables.Exists(InputField) Then
        varRequestVariables(InputField) = varRequestVariables(InputField) & "," & Trim(InputValue)
      Else
        varRequestVariables.Add InputField, Trim(InputValue)
      End If
    Next
  Next

  For each InputField in Request.Form
    For each InputValue in Request.Form(InputField)
  If (InputField <> "x") and (InputField <> "y") then
    varNewMailContent = varNewMailContent & InputField & ": " & InputValue & vbCrLf
   End If
    Next
  Next




Replies:
Posted By: b_bonnett
Date Posted: 12 August 2003 at 3:51am

http://www.pd9soft.com/aspFormMail/index.asp - http://www.pd9soft.com/aspFormMail/index.asp  (all right, so I am slightly biased towards that ).

Basically, for the alphabetic sort, we used the Split() function to split the Request.Form data up, got the left hand side (i.e. field names), performed a alphabetical sort (plenty of scripts for these out there) on them and shoved them and their values into the body of the email.

Blair



-------------
Webmaster, http://www.planegallery.net/ - The Plane Gallery
Greetings From Christchurch


Posted By: MorningZ
Date Posted: 12 August 2003 at 8:48am

"How can I retrieve the fields in my form in the order they appear in the form?"

http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=64 - http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=64



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: rock
Date Posted: 12 August 2003 at 9:57am

b_bonnett,   Thanks for the link. I got it to work now. 

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net