Avatar of nsitedesigns
nsitedesignsFlag for United States of America asked on

form mail scripting

How do I modify this value so that the online form sends results in the order that they are displayed in the form?  Right now, address 1 comes first, then address 2, city, etc.  I would prefer to have first name, last name, address, etc.  I believe I have to modfiy  the following but I don't know what to put in place of the value=alpha
<input type="hidden" name="form_order" value="alpha"/>

In addition, I would like the form results to appear IN the email body, not as an attachment. Any idea how to do that?

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Final Touch Interiors : SE Wisconsin Interior and Exterior Painting Contractor</title>
<link href="final.css" rel="stylesheet" type="text/css">
</head>

<body id="contact">

<div class="container"><img src="img/roller.png" alt="Final Touch Interiors" class="roller" /><br>

<div class="header"><!-- NAVIGATION - MAIN --><div id="nav_container"><div id="nav"><ul><li class="first"><a href="services.html">Services</a></li><li><a href="gallery.html">Gallery</a></li><li><a href="contact.html">Contact</a></li><li><a href="index.html">Home</a></li></ul></div>
  <a href="index.html"><img src="img/logo.png" width="284" class="logo_splat" height="177" alt="Final Touch Interiors" /></a><a href="index.html"></a><!-- end .header --></div></div>
    
    <div class="sidebar1"><img src="img/t_buehler.jpg" width="306" height="278" alt="" />
      <h2>Low and Zero VOC Paints</h2>
      <p>We care about your health and the environment. Part of our commitment to our customers, our crew, our families and our community is to embrace green products, whenever possible. We offer and encourage the use of low and zero Volatile organic compounds (VOCs) paints and products. </p> 
    
    <!-- end .sidebar1 --></div>
  <div class="content">
    <h1>Contact</h1>
    <p>Call us at (920) 287-2808 for any interior or exterior painting and staining projects.   We are available Monday through Saturday from from 6:00 am to 8:00 pm. No project is too big or too small.</p>
    <p>&nbsp;</p>
    <p>We work around your schedule. Right from your first phone call we will set up an appointment that's convenient for you. Work during the day? That's okay. Got kids to pick up or drop off? No problem - we make appointments for evenings and weekends too.</p>
    <p>&nbsp;</p>
    <p>Complete  the form below and we will contact you shortly.</p>
    
    <!-- BEGIN FORM -->
    
 <form action="/webformmailer.php" method="post"> 
<input type="hidden" name="subject" value="Submission" /> 
<input type="hidden" name="redirect" value="thankyou.html" />
 
    <table cellpadding="5" cellspacing="1" width="100%" class="contactFormTable" style="text-align: left;">
        <tbody>
            <tr>
                <td style=" text-decoration: none; font-weight: normal;" align="left">
               
                <table cellpadding="9" cellspacing="1" width="100%" border="0" class="contactFormTable" style="text-align: left;">
                    <tbody>
                        <tr>
                            <td valign="top" ><p><span id="formLabel_First" controlid="formElement_First">First Name</span></p></td>
                            <td valign="top" > <input type="text" name="FirstName" /></td>
                        </tr>
                        <tr>
                            <td valign="top" ><p><span id="formLabel_Last" controlid="formElement_Last">Last Name</span></p></td>
                            <td valign="top" ><input type="text" name="LastName" /></td>
                        </tr>
                        <tr>
                            <td valign="top" ><p><span id="formLabel_Street1" controlid="formElement_Street1">Address Street 1</span></p></td>
                            <td valign="top" ><input id="formElement_Street1" size="30" name="Address Street 1" labelid="formLabel_Street1" /></td>
                        </tr>
                        <tr>
                            <td valign="top" ><p><span id="formLabel_Street2" controlid="formElement_Street2">Address Street 2</span></p></td>
                            <td valign="top" ><input id="formElement_Street2" size="30" name="Address Street 2" labelid="formLabel_Street2" /></td>
                        </tr>
                        <tr>
                            <td valign="top" ><p><span id="formLabel_City" controlid="formElement_City">City</span></p></td>
                            <td valign="top" ><input name="City" id="formElement_City" size="30" labelid="formLabel_City" /></td>
                        </tr>
                        <tr>
                          <td valign="top" ><p><span id="formLabel_State2" controlid="formElement_State">State</span></p></td>
                          <td valign="top" ><select id="State" name="State2">
                            <option value="AL" selected="selected">AL</option>
                            <option value="AK">AK</option>
                            <option value="AZ">AZ</option>
                            <option value="AR">AR</option>
                            <option value="CA">CA</option>
                            <option value="CO">CO</option>
                            <option value="CT">CT</option>
                            <option value="DE">DE</option>
                            <option value="DC">DC</option>
                            <option value="FL">FL</option>
                            <option value="GA">GA</option>
                            <option value="HI">HI</option>
                            <option value="ID">ID</option>
                            <option value="IL">IL</option>
                            <option value="IN">IN</option>
                            <option value="IA">IA</option>
                            <option value="KS">KS</option>
                            <option value="KY">KY</option>
                            <option value="LA">LA</option>
                            <option value="ME">ME</option>
                            <option value="MD">MD</option>
                            <option value="MA">MA</option>
                            <option value="MI">MI</option>
                            <option value="MN">MN</option>
                            <option value="MS">MS</option>
                            <option value="MO">MO</option>
                            <option value="MT">MT</option>
                            <option value="NE">NE</option>
                            <option value="NV">NV</option>
                            <option value="NH">NH</option>
                            <option value="NJ">NJ</option>
                            <option value="NM">NM</option>
                            <option value="NY">NY</option>
                            <option value="NC">NC</option>
                            <option value="ND">ND</option>
                            <option value="OH">OH</option>
                            <option value="OK">OK</option>
                            <option value="OR">OR</option>
                            <option value="PA">PA</option>
                            <option value="RI">RI</option>
                            <option value="SC">SC</option>
                            <option value="SD">SD</option>
                            <option value="TN">TN</option>
                            <option value="TX">TX</option>
                            <option value="UT">UT</option>
                            <option value="VT">VT</option>
                            <option value="VA">VA</option>
                            <option value="WA">WA</option>
                            <option value="WV">WV</option>
                            <option value="WI">WI</option>
                            <option value="WY">WY</option>
                          </select></td>
                        </tr>
                        <tr>
                            <td valign="top" ><p><span id="formLabel_Zip" controlid="formElement_Zip">Zip Code </span>(5 digits)</p></td>
                            <td valign="top" >
                              <input name="Zip Code" id="formElement_Zip" size="5" maxlength="5" labelid="formLabel_Zip" /></td>
                        </tr>
                        <tr>
                            <td valign="top" ><p><span id="formLabel_DaytimePhone" controlid="formElement_DaytimePhone">Daytime Phone</span></p></td>
                            <td valign="top" ><input name="Daytime Phone" id="formElement_DaytimePhone" size="30" labelid="formLabel_DaytimePhone" /></td>
                        </tr>
                        <tr>
                            <td valign="top" ><p><span id="formLabel_EveningPhone" controlid="formElement_EveningPhone">Evening Phone</span></p></td>
                            <td valign="top" ><input name="Evening Phone" id="formElement_EveningPhone" size="30" labelid="formLabel_EveningPhone" /></td>
                        </tr>
                        <tr>
                            <td valign="top" ><p><span id="formLabel_liamE" controlid="formElement_liamE">Email</span></p></td>
                            <td valign="top" ><input type="text" name="email" /></td>
                        </tr>
                        <tr>
                            <td colspan="1" valign="top" ><p><span id="formLabel_17a53" controlid="formElement_17a53">I would like work on</span></p></td>
                            <td colspan="1" valign="top" ><select id="formElement_17a53" name="I would like work on" size="1">
                            <option value="Interior" selected="selected">Interior</option>
                            <option value="Exterior">Exterior</option>
                             <option value="Commerical">Commercial</option>
                            <option value="Deck/Fence">Deck/Fence</option>
                           <option value="Color Consultation">Color Consultation</option>
                            </select></td>
                        </tr>
                        <tr>
                            <td valign="top" ><p><span id="formLabel_Comments" controlid="formElement_Comments">Project</span> Details</p></td>
                            <td valign="top" ><textarea name="comments" cols="40" rows="10"></textarea></td>
                        </tr>
                        <tr>
                          <td >&nbsp;</td>
                          <td valign="top" ><input type="submit" name="submit" value="Submit"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" name="reset" value="Reset"/></td>
                        </tr>
                  </tbody>
                </table>
                
              </td>
            </tr>
        </tbody>
    </table>

<input type="hidden" name="form_order" value="alpha"/> <input type="hidden" name="form_delivery" value="hourly_digest"/> <input type="hidden" name="form_format" value="text"/> </form>

  <!-- END FORM -->


    <!-- end .content --></div>
  <div class="footer"><img src="img/logos_memberships.gif" alt="Final Touch Interiors Memberships" width="825" height="144" usemap="#Map" class="logo_memberships" />
    <map name="Map">
      <area shape="rect" coords="268,65,414,102" href="http://www.angieslist.com/companylist/us/wi/sheboygan/final-touch-interiors-reviews-7633653.htm" target="_blank" alt="Angies List">
      <area shape="rect" coords="739,14,822,117" href="http://www.sheboygan.org/" target="_blank" alt="Sheboygan County Chamber of Commerce">
      <area shape="rect" coords="435,7,717,151" href="http://www.sherwin-williams.com/" target="_blank" alt="Sherwin Williams">
      <area shape="rect" coords="-2,33,100,141" href="http://www.sheboyganpress.com" target="_blank" alt="Sheboygan Press Reader's Choice Award">
      <area shape="rect" coords="110,20,259,131" href="http://www.linkedin.com/pub/matt-gardner/48/338/458" target="_blank" alt="Linded In">
    </map>
   
    <!-- end .footer --></div>
  <!-- end .container --></div>
</body>
</html>

Open in new window

(Question edited to put code into the code snippet ~Ray)
contact.html
PHPWeb DevelopmentHTML

Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon
Marco Gasi

I think you have to show us webformmailer.php to get an answer...
ASKER
nsitedesigns

ah, that doc is blocked.  I cannot make any changes to it.  : (
COBOLdinosaur

Without seeing the whole code there is no way for us to have enough understanding of the context to find a solution.


Cd&
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
Ray Paseur

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Dave Baldwin

It turns out that data 'posted' thru a browser is not necessarily sent in the order you see it in the form.  'webformmailer.php' (and 'formmail.pl') just take what they are given and pass it on.  If you want it in a certain order in your email, you have to write a custom script that does what you want.

Also, 'webformmailer.php' on Godaddy is a major target for spammers since it is installed on every Godaddy web site.  Since I always write my own forms, I always delete it.
ASKER
nsitedesigns

Ray, thanks for the code but I do not have access to php so I am unable to make any changes.  I would have thought that I could simply change the <input type="hidden" name="form_order" value="alpha"/> to something other than "alpha" but I guess that is not the case.  

Dave,
Client was not interested in any type of online form that would cost extra.  I cautioned him  that he would open himself up to a lot of spam.
Dave Baldwin

I found one remaining copy of 'webformmailer.php' on my computer.  All it does is package up the form variables into a file and puts the file in an email 'pickup' directory for a server process to pick it up and mail it as an attachment.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Ray Paseur

I do not have access to php...
You can't install any PHP scripts on the site?  I would be very surprised if that were true.  I'm suggesting that you replace the webformailer.php script with something of your own.  Then you can get the mail into any format that makes sense for your needs.