• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Need help with form output in email.

New Here ,
Nov 03, 2011 Nov 03, 2011

Copy link to clipboard

Copied

Thanks to the helpful people on this form, I added a "Send Feedback" link that pops up a feedback form.

The form works - but the problem is the formatting of the output.

When I test the email, the content looks as follows:

Employee Name=Joe Employee

Employee Phone=12345

Employee Email=jemployee@anycompany.com Was the information helpful?=No Employee Comments=This was a very confusing topic.

I don't understand it.

Could you explain it better please.

Thanks!

Joe

The form content is as follows (entered entirely by inserting form elements via RoboHelp and tweaking text). It is also embedded in a DHTML pop-down text (not that I think that makes a diffference).

Obviously, I would like to get the email link to not concatenate the "Email=" with the actual email address, and would like the pull-down menu ("Was the information helpful?") and Employee Comments to appear on separate lines.

<form method="post" name="myForm" action="mailto:someone@anycompany.com?Subject=IT Help Feedback"

    onsubmit="return Email()" enctype="text/plain" style="border: Groove 1px #400040;

    width: 450px; background-color: #e1e1e1;">

<table style="height: 359px; left: 0px; top: 0px; border-left-style: Groove;

    border-left-width: 4px; border-right-style: Groove; border-right-width: 4px;

    border-top-style: Groove; border-top-width: 4px; border-bottom-style: Groove;

    border-bottom-width: 4px;" cellspacing="0" width="450">

  <col width="296" />

  <tr>

   <td><h4>My Name</h4>

   <p><input type="text" name="Employee Name" style="width: 375px;" /></p>

   <h4>My Phone Extension</h4>

   <p><input type="text" name="Employee Phone" style="width: 375px;" /></p>

   <h4>My Email</h4>

   <p><input type="text" name="Employee Email" style="width: 375px;" /></p>

   <h4>I found this information helpful</h4>

   <p><select name="Was the information helpful?" style="width: 375px;">

   <option>Yes</option>

   <option>No</option>

   </select></p>

   <h4>Comments on this Help Page</h4>

   <p><textarea name="Employee Comments" rows="2" cols="20" style="width: 380px;

       height: 122px;"></textarea></p>

   <p>&#160;</p></td>

  </tr>

  <tr>

   <td><p style="text-align: right;"><input type="submit" value="Send"

              style="width: 83px;" /></p></td>

  </tr>

</table>

</form>

Any help appreciated.

Thanks,

George

Views

1.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 03, 2011 Nov 03, 2011

Copy link to clipboard

Copied

Hi there

This is really more of a general web programming question than RoboHelp, but even so I'll try to help.

To start, where did you get the impression that RoboHelp would do anything that would help you with forms? It's a help authoring tool, not a forms processor.

Question here. Can you post the entire HTML of the page? You posted only the form code. I'm trying to determine if there is additional script that contains a function called email().

Cheers... Rick

Helpful and Handy Links

RoboHelp Wish Form/Bug Reporting Form

Begin learning RoboHelp HTML 7, 8 or 9 within the day!

Adobe Certified RoboHelp HTML Training

SorcerStone Blog

RoboHelp eBooks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2011 Nov 04, 2011

Copy link to clipboard

Copied

Sure ... here you go Rick, thanks. By the way - thanks for the "Skinny on Skins" (assuming that's yours). It's been extremely helpful over the years.

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="template" content="Multi-Topic-Master.htt" />
<meta name="rh-authors" content="Joe Author" />
<meta name="generator" content="Adobe RoboHelp 9" />
<title>Welcome</title>
<link rel="StyleSheet" href="ltcp_styles.css" type="text/css" />
</head>

<body>
<?rh-script_start ?><script src="ehlpdhtm.js" type="text/javascript" language="JavaScript1.2"></script><?rh-script_end ?>
<h1>Welcome to the Xerox Printers Overview</h1>
<p>This online help introduces some features of the new Xerox WorkCentre
5700 and 7500 series printers that will help improve your daily workflow.
Among these features are:</p>
<?rh-list_start class="rl-p-Bullet_Ind1" an="1" level="1" ?><p class="Bullet_Ind1"><a
  href="staple-hp.htm" title="The Staple and Hole Punch Features">Printing
output using the Staple and Hole Punch features</a></p><?rh-list_end ?>
<?rh-list_start class="rl-p-Bullet_Ind1" an="1" level="1" ?><p class="Bullet_Ind1"><a
  title="The Secure Print Feature" href="secure_print.htm">Printing
with the Secure Job feature</a></p><?rh-list_end ?>
<?rh-list_start class="rl-p-Bullet_Ind1" an="1" level="1" ?><p class="Bullet_Ind1"><a
  title="Faxing a Print Job Help" href="fax-print.htm">Faxing a print
job to specified recipients</a></p><?rh-list_end ?>
<?rh-list_start class="rl-p-Bullet_Ind1" an="1" level="1" ?><p class="Bullet_Ind1"><a
  title="Faxing Scanned Documents to a Folder Help" href="fax-sc-docs-fold.htm">Faxing
scanned documents to a publicly accessible folder</a></p><?rh-list_end ?>
<?rh-list_start class="rl-p-Bullet_Ind1" an="1" level="1" ?><p class="Bullet_Ind1"><a
  title="Scanning Documents to Email Help" href="scan-doc-email.htm">Faxing
scanned documents to one or more email addresses</a></p><?rh-list_end ?>
<p class="p">The full user’s guide for the Xerox 5700 series of printers
can be found here:</p>
<p class="p"><a href="http://download.support.xerox.com/pub/docs/WC5735_WC5740_WC5745_WC5755/userdocs/any-os/en/UG.pdf"
     title="Xerox 5700 Series User Guide">http://download.support.xerox.com/pub/docs/WC5735_WC5740_WC5745_WC5755/userdocs/any-os/en/UG.pdf</a></p>
<p class="p">The full user’s guide for the Xerox 7500 series of printers
can be found here:</p>
<p class="p"><a href="http://download.support.xerox.com/pub/docs/WC7755_WC7765_WC7775/userdocs/any-os/en_GB/WC77XX_user_gu..."
     title="Xerox 7500 Series User Guide">http://download.support.xerox.com/pub/docs/WC7755_WC7765_WC7775/userdocs/any-os/en_GB/WC77XX_user_gu...</a></p>
<p class="p">If you have any further questions or concerns after reading
this help or the above user guides, or if you want certain print features
to be activated on the Xerox printer that require a system administrator
to set them up, please contact the Helpdesk at extension 12345.</p>
<table style="border-collapse: separate; border-collapse: separate;" cellspacing="0"
   width="100%" border="1">
<col style="width: 7.448%;" />
<col style="width: 92.552%;" />
<tr>
  <td><p style="text-align: center;"><img src="bloc_notes_sz.png"
             alt="" style="border: none;"
             width="64" height="64"
             border="0" /></p></td>
  <td><i style="font-style: italic; font-family: Arial, sans-serif;"><span
   style="font-weight: bold;">Note</span>: By default, Any Company's IT department has set up these printers to use 2-sided
   printing to save on paper costs, and black and white printing
   to save on ink costs. You can override these default options when
   necessary in the Xerox printer properties window (for the Xerox
   7500 series color printers, a Color Options tab appears in the
   printer properties window), but we would ask you to keep costs
   in mind whenever printing.</i></td>
</tr>
</table>
<p>&#160;</p>
<h4><a class="dropspot" href="javascript:TextPopup(this)" id="a1">Send
Feedback on This Help Page</a></h4>
<div class="droptext" id="POPUP406431665" style="display: none;">
<p>Filling out and submitting this form will send an e-mail to the
  IT HelpDesk that contains the form information (your name, extension,
  opinion on the helpfulness of the information, and any comments that
  you may have on the help page).</p>
<p>After you fill out the form, clicking the Send Link <img src="email_icon.png"
  alt="" style="border: none;" border="0" /> button in the navigation
  bar at the top of the page. This &#160;will e-mail your current link
  location to the Help Desk personnel, so that they can see the help
  page to which your comments refer.</p>
<p>Because these e-mails are sent internally on the Any Company's network,
  you can ignore any Outlook warning messages that may appear when you
  submit the form from your web page. We appreciate any comments that
  you send.</p>
<form method="post" name="myForm" action="mailto:joeauthor@anycompany.com?Subject=IT Help Feedback"
    onsubmit="return Email()" enctype="text/plain" style="border: Groove 1px #400040;
    width: 450px; background-color: #e1e1e1;">
<table style="height: 359px; left: 0px; top: 0px; border-left-style: Groove;
    border-left-width: 4px; border-right-style: Groove; border-right-width: 4px;
    border-top-style: Groove; border-top-width: 4px; border-bottom-style: Groove;
    border-bottom-width: 4px;" cellspacing="0" width="450">
  <col width="296" />
  <tr>
   <td><h4>My Name</h4>
   <p><input type="text" name="Employee Name" style="width: 375px;" /></p>
   <h4>My Phone Extension</h4>
   <p><input type="text" name="Employee Phone" style="width: 375px;" /></p>
   <h4>My Email</h4>
   <p><input type="text" name="Employee Email" style="width: 375px;" /></p>
   <h4>I found this information helpful</h4>
   <p><select name="Was the information helpful?" style="width: 375px;">
   <option>Yes</option>
   <option>No</option>
   </select></p>
   <h4>Comments on this Help Page</h4>
   <p><textarea name="Employee Comments" rows="2" cols="20" style="width: 380px;
       height: 122px;"></textarea></p>
   <p>&#160;</p></td>
  </tr>
  <tr>
   <td><p style="text-align: right;"><input type="submit" value="Send"
              style="width: 83px;" /></p></td>
  </tr>
</table>
</form>
<p>&#160;</p>
</div>
<?rh-script_start ?><script type="text/javascript" language="JavaScript1.2">//<![CDATA[
if( typeof( TextPopupInit ) != 'function' ) TextPopupInit = new Function();
TextPopupInit('a1', 'POPUP406431665');
//]]></script><?rh-script_end ?>
</body>
</html>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2011 Nov 04, 2011

Copy link to clipboard

Copied

Thinking about it, an email function also called by a Navigation Bar button that was added to email the link with which the help page is associated. Not sure if this makes a difference (as it's not associated with the form script).

This code is pasted into the skin for the "onClick" action associated with the custom "Send Link" button. Not sure if this makes a difference or not.

window.location=('mailto:jauthor@anycompany.com?Subject=Help Link for Form&body=This page might help: ' + window.parent.frames[1].frames[1].document.title +' ' + escape(window.parent.frames[1].frames[1].document.location))

There is an error on the web page after generation (Internet Exploder) - which looks like it might have something to do with that function:

Line:xxxx

Char: 1

Error: Object expected

Code: 0

URL: file://file/path/name (assuming this is the location of the file called by the window.location=function above).

George

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 04, 2011 Nov 04, 2011

Copy link to clipboard

Copied

Hi,

Didn;t see your other post so here's another reply.

What version of RoboHelp are you using? The e-mail ink may break when you upgrade to RH9. You can try my tool bar script which also offers an mail link function: http://www.wvanweelden.eu/robohelp/toolbarscripts

Greet,

Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2011 Nov 04, 2011

Copy link to clipboard

Copied

Okay - I used your script. It didn't seem to fix my problem (proper formatting of output from form), but I think it is probably  a neater solution than keeping the "send link" code connected with an image in the topic text (mostly because the script is easy to store with the skin, for re-use in future projects).

My only comment on how the skin worked was that even though it e-mailed the correct page link (with an "index.htm#<topic-file-name>"), clicking on that link just brought up the "index.htm" page (with no TOC topic index attached). Not sure if that was because I was launching locally on my own machine or not.

So far - what I've gathered:

  • The basic problem still exists .... the form does not display correctly as delivered. Apparently it contains "extra line breaks" which are stripped by the e-mail client. Restoring those line breaks at least puts form contents (Name, Phone, E-mail, Radio Button (Helpful = Yes or No), and Comments on separate lines.
  • The email link somehow becomes malformed.
  • There is some error on the web page (generated by RH9 - opened in Internet Exploder) ... I'm not sure what's causing the error (whether it is the "send mail" function in the Skin/Toolbar or in the form script).
  • The skin has the edited script provided by Willam (thanks) - so that the page location is e-mailed when a "Send Link" toolbar button is pressed (with some caveats as above).
  • The page has the following form and scripts inserted into a Drop-down at the bottom of the page (I'm not sure why the form method in bold has the weird link in the mailto URL - it doesn't seem to stop the form from sending the email to the correct address and CC address though - the only thing that gets screwed up is the employee email link in the body of the received email)):

<h4><a class="dropspot" href="javascript:TextPopup(this)" id="a1">Send
Feedback on This Help Page</a></h4>
<div class="droptext" id="POPUP406431665" style="display: none;">
<p>Filling out and submitting this form will send an e-mail to the
  IT HelpDesk that contains the form information (your name, extension,
  opinion on the helpfulness of the information, and any comments that
  you may have on the help page).</p>
<p>After you fill out the form, click the Email Link button on the
  toolbar to create an e-mail containing the link to this help page:
  <img src="email_icon.png" alt="" border="0" /></img> </p>
<p>This will allow Help Desk personnel to see the help page to which
  your comments refer.</p>
<p>Because these e-mails are sent internally on the AnyCorp's network,
  you can ignore any Outlook warning messages that may appear when you
  submit the form from your web page. We appreciate any comments that
  you send.</p>
<form method="post" name="myForm" action="mailto:joeit@anycorp.com?Subject=IT Help Feedback&cc=joeit2@anycorp.com"
    onsubmit="return Email()" enctype="text/plain" style="border: Groove 1px #400040;
    width: 450px; background-color: #e1e1e1;">
<table style="height: 359px; left: 0px; top: 0px; border-left-style: Groove;
    border-left-width: 4px; border-right-style: Groove; border-right-width: 4px;
    border-top-style: Groove; border-top-width: 4px; border-bottom-style: Groove;
    border-bottom-width: 4px;" cellspacing="0" width="450">
  <col width="296" />
  <tr>
   <td><h4>My Name</h4>
   <p><input type="text" name="Employee Name" style="width: 375px;" /></p></td>
  </tr>
  <tr>
   <td><h4>My Phone Extension</h4>
   <p><input type="text" name="Employee Phone" style="width: 375px;" /></p></td>
  </tr>
  <tr>
   <td><h4>My Email</h4>
   <p><input type="text" name="Employee E-Mail Address"  style="width: 375px;" /></p></td>
  </tr>
  <tr>
   <td><h4>I found this information helpful</h4>
   <p><select name="Was the information helpful?" style="width: 200px;">
   <option>Yes</option>
   <option>No</option>
   </select></p></td>
  </tr>
  <tr>
   <td><h4>Comments on this Help Page</h4>
   <p><textarea name="Employee Comments" rows="2" cols="20" style="width: 380px; height: 122px;"></textarea></p></td>
  </tr>
  <tr>
   <td><p style="text-align: right;"><input type="submit" value="Send"
              style="width: 83px;" /></p></td>
  </tr>
</table>
</form>
</div>
<?rh-script_start ?><script type="text/javascript" language="JavaScript1.2">//<![CDATA[
if( typeof( TextPopupInit ) != 'function' ) TextPopupInit = new Function();
TextPopupInit('a1', 'POPUP406431665');
//]]></script><?rh-script_end ?>

Relevant images are pasted below:

robohelp-form-1.pngrobohelp-form-2.pngrobohelp-form-3.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 04, 2011 Nov 04, 2011

Copy link to clipboard

Copied

LATEST

Hi,

The problem is that you CANNOT resolve this problem without using a different method to post the form. You use a mailto link with a text/plain enctype. You can resolve this by using a server side script to parse the form input and put it into a better looking e-mail. Sorry, but your problem comes from the limitations of directly e-mailing form results.

See http://www.javascript-coder.com/html-form/html-form-tutorial-p4.phtml for an introduction to server side scripting to send a form. Creating such a script is a piece of cake for a web developer, perhaps one of your developers can help you with that.

Greet,

Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 04, 2011 Nov 04, 2011

Copy link to clipboard

Copied

Hi,

Formatting mail sent from a HTML form is only possible with server side scripting, as Rick already indicated. You or a developer will have to create a CGI, PHP, ASP, etc script that parses the content returned by the form into a structured email message. No easy way out. Instead of mailing the form, you post the form to the script and the script takes care of the rest: You can also let the page store the answers in a database or do whaterver you feel like it should do.

Greet,

Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp