homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Gold Sponsor 2015!
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

NMS FormMail Version 3.14c1 Formating E-mail out put
Formating Perl E-mal output

5+ Year Member

Msg#: 4409 posted 7:35 pm on Mar 21, 2006 (gmt 0)

Currently with my output of my form looks like this:
Name: Test name

best_contact_time: Test time

day 3 digit number: Tes

day 4 digit number: Test

day area code: Tes

evening 3 digit number: tes

evening 4 digit number: test

evening area code: test

preferred_method: test method

I would like it to look like this:
Best Time to Contact:
Phone Number (Day): all three together
Phone Number (Evening): same
Preferred Method of Contact:

I am using NMS FormMail Version 3.14c1 is there anyone out there that could possibly help me?



5+ Year Member

Msg#: 4409 posted 8:52 pm on Mar 21, 2006 (gmt 0)

I am currently new to perl scripting and the client that I am working for would rather have his forms submited through perl rather then PHP so I am giving this a shot so if there is any info for me that would be great.



10+ Year Member

Msg#: 4409 posted 9:31 pm on Mar 21, 2006 (gmt 0)

The simplest way would be to just alter the form to make the three fields into one field called "Phone Number (Daytime)" instead of three fields. Similar for the other things: instead of a form field called "preferred_contact" change it to "Preferred Method of Contact." That kind of thing.

I haven't looked at NMS FormMail for some time but I imagine it just grabs the form field names and sticks them in the email as they are after checking for security issues and so forth.

Otherwise, you're going to have to go into the code of the script where it processes the information and manually write Perl code to stick those values together and rewrite the email so that it sends things they way you want.

Sorry, not to be vague, but the answer unfortunately isn't as simple as "change $foo to $bar on line 27". There's going to be a place in the form where it goes through the form data variables (probably with a "foreach" loop) and appends them to the form. This will look somewhat similar to php.

In general, though, the easiest is to just change the form field names to how you want them to appear in the email.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved