Home

   Home

   Download


Help

   FAQ

   Installation

   Message Board

   Importing Data File
   Into GoldMine
   Into Act


Other

   Testimonies

   Custom Programming

   PHP Version


Other Favorites

   Hire a clean comedian

   Bible Search Engine

   Bible in a Year

   Parallel Bible

   The Richer Life










 





[ Message Board Home ]    [ Post Reply ]    [ Log In ]    [ Sign Up ]



  Subject: Format of Data Email
  Posted: 07/30/2004 at 8:58:54 am
  By: ianclarke

Dear Seth,

Would it be possible to have the data placed on the line following the field name?

E.g. instead of:

firstname: Ian

would it be possible to have

firstname:

Ian

If so would it be possible for yuo to let me know what to do to the script?

Many thanks

Ian




  Subject: Re: Format of Data Email
  Posted: 07/30/2004 at 9:55:15 am
  By: Seth Knorr

Yes you can.

Are you using sendmail or SMTP?

Seth



  Subject: Re: Format of Data Email
  Posted: 07/30/2004 at 11:38:27 am
  By: ianclarke

Seth,

sendmail

Ian



  Subject: Re: Format of Data Email
  Posted: 07/31/2004 at 2:23:12 pm
  By: Seth Knorr

Ok follow these steps.

1. Open sendmail.cgi in NOTE PAD.

2. Left click -> Edit - > Go To
Then type in "Line Number:" 45

On this line you should see:

print MAIL "${'myname'}: ${'myvalue'} \n\n";

You want to make the line look like this;

print MAIL "${'myname'}\n\n ${'myvalue'} \n\n";



Seth



  Subject: Re: Format of Data Email
  Posted: 08/02/2004 at 11:19:51 am
  By: ianclarke

Hi Seth,

Thanks for that. Unfortunately it didn't work! I copied and pasted your code into line 45 but still get:

FirstName: Ian

Do I need to make any changes anywhere else?

Best wishes

Ian



  Subject: Re: Format of Data Email
  Posted: 08/02/2004 at 11:27:50 am
  By: ianclarke

Dear Seth,

A little bit of experiemntation has provided the result. I have changed Line 60 to:

print MAIL "${'sfield'}:\n${'sfieldvalue'} \n\n";

which achieves -

FirstName:
Ian

Does changing Line 45 deal with blank fields?

Many thanks for setting me on the track.

Best wishes

Ian



  Subject: Re: Format of Data Email
  Posted: 08/02/2004 at 12:55:02 pm
  By: Seth Knorr

Ah, you may be right, I would have to go back and check.

Seth



  Subject: Re: Format of Data Email
  Posted: 08/02/2004 at 2:24:53 pm
  By: ianclarke

Dear Seth,

Another question I'm afraid.

When using a textarea such as:

<textarea name="Comment" rows="10" cols="50"></textarea>

is it possible to have all the data sent in just one line even when the user uses <Return> in his/her comment?

I've tried using wrap="soft" but that didn't seem to make any difference?

Many thanks again.

Best wishes

Ian



  Subject: Re: Format of Data Email
  Posted: 08/02/2004 at 3:00:35 pm
  By: Seth Knorr

Yes, but it would be complicated. What are you trying to accomplish. As in.. do you want this to appear this way in your data file, results email?...etc....


Seth




  Subject: Re: Format of Data Email
  Posted: 08/02/2004 at 3:12:05 pm
  By: ianclarke

Dear Seth,

I want the single line in the results email so I can extract to Excel. If the form filler uses a <Return> and the data goes on to another line the Excel macro no longer works because the field data is in the wrong place. I could use <input type="text"> but that doesn't encourage the form filler to put a full comment.

Any thoughts?

Many thanks.

Best wishes

Ian



  Subject: Re: Format of Data Email
  Posted: 08/02/2004 at 7:05:02 pm
  By: Seth Knorr

Ok open sendmail.cgi again, and go to line 60.

You should see a line:

print MAIL "${'sfield'}: 'sfieldvalue'} \n\n";

Directly before this line past this code:

if (${'sfield'} eq "Comment") {
${'sfieldvalue'} =~ s|\n|--|g;
}


AND YOU SHOULD BE ALL SET.


Seth



  Subject: Re: Format of Data Email
  Posted: 08/03/2004 at 1:16:13 am
  By: ianclarke

Dear Seth,

Thanks for that. Tried it and got "Internal Server Error". Took it out and all was well.

I'll experiment with field names. My current field names have spaces. I'll take them out and see what happens.

Best wishes

Ian



  Subject: Re: Format of Data Email
  Posted: 08/03/2004 at 1:27:34 am
  By: ianclarke

Seth,

Removing the spaces in the field names didn't work. Not sure what to do next.

I'm assuming that "Comment" in your new code is the name of the textarea in which I want to remove any <Return>s so I could use any textarea name in the same place?

Best wishes

Ian



  Subject: Re: Format of Data Email
  Posted: 08/03/2004 at 3:34:17 am
  By: Seth Knorr

Sorry actualy I made a typo. I forgot the opening curly bracket.

SHOULD BE:

if (${'sfield'} eq "Comment") {
${'sfieldvalue'} =~ s|\n|--|g;
}


Seth



  Subject: Re: Format of Data Email
  Posted: 08/03/2004 at 6:59:41 am
  By: ianclarke

Seth,

You are a genius. It works a treat and I've discovered I can put the code in several times for differently names textareas. Well done!

I'm afraid one more question! What do I put between the | | instead of |--| so the <Return> is replaced by a space rather than --? (I've tried   but just got  !) When I tried just leaving a space no data email was received.

Many thanks again.

Your support for this product is excellent.

Best wishes

Ian



  Subject: Re: Format of Data Email
  Posted: 08/03/2004 at 7:01:27 am
  By: ianclarke

Seth,

Have just seen my previous post. The ampersandnbsp; got converted to a space!

Ian



  Subject: Re: Format of Data Email
  Posted: 08/03/2004 at 7:20:29 am
  By: ianclarke

Hi Seth,

Cracked it! The following produces a space

${'sfieldvalue'} =~ s|\n|\ |g;

Many thanks again for your help.

Best wishes

Ian




  Subject: Re: Format of Data Email
  Posted: 08/03/2004 at 7:43:50 am
  By: Seth Knorr

Yeah, actualy you where close. The problem is that when using "&" it is used in Perl as functionality so to speak, so you have to escape the charachter. The escape charachter is "\". I will put - between the nbsp so it will show up but it should look like this basicaly.

${'sfieldvalue'} =~ s|\n|\&-n-b-s-p;|g;

I would probably use that instead of the space, as the space may cause problems.

Seth



  Subject: Re: Format of Data Email
  Posted: 08/03/2004 at 9:14:35 am
  By: ianclarke

Seth,

You were right. When I used (\ ) with 30 different textareas I got Internal Server error.

However when I used your suggestion above I got ( ) in the data email instead of a space.

I'll keep experimenting!

Ian



  Subject: Re: Format of Data Email
  Posted: 08/03/2004 at 9:30:36 am
  By: ianclarke

Seth,

Just seen my post. Should have read:

However when I used your suggestion above I got (ampersandnbsp) in the data email instead of a space. Same result as if the \ wasn't there.

Ian



Reply To This Topic

Subject
Message  
Username
Password
Due to unrelated post's, you must have an
account to post a message. To Sign Up click here.




Copyright 2000-2010 Seth M. Knorr,
BizMailForm.com Forms Processor, All Rights Reserved