SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast canz's Avatar
    Join Date
    Mar 2005
    Location
    New Zealand
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with Submitted form Layout

    I'm playing around with a form,

    My problem is, when the form is submitted and comes to my email, it is a very long list, eg
    Features Flash:
    Features Video: on
    Features PhotoGallery: on
    Features MessageBoard:
    Features Shopping Cart:

    I would like to compact the list somehow, either by having no breaks lines, or not showing things that weren't selected, also how do I change the word on for break... I borrowed bit's and pieces of code from here and there to get this form working, and just these few little things annoyment.

    Does anyone understand what I'm talking about? I won't blame you if you don't. But I know there has to be a way to get it to do what I want....

    Lyn

  2. #2
    monitormensch oerdec's Avatar
    Join Date
    Sep 2004
    Location
    Hamburg
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    you want to customise the submitted email, right? How is it submitted? It would be helpful to post the code.

    oerdec

  3. #3
    SitePoint Enthusiast canz's Avatar
    Join Date
    Mar 2005
    Location
    New Zealand
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey, I'm really new to this.. so I hope I post the right code.

    <?php
    include("global.inc.php");
    $errors=0;
    $error="The following errors occured while processing your form input.<ul>";
    pt_register('POST','Name');
    pt_register('POST','Company');
    pt_register('POST','Address');
    pt_register('POST','City');
    pt_register('POST','Country');
    pt_register('POST','Email');
    pt_register('POST','Phone');
    pt_register('POST','Fax');
    pt_register('POST','NewRedesign');
    pt_register('POST','Url');
    pt_register('POST','Pages');
    pt_register('POST','TargetExisting');
    pt_register('POST','TargetDealers');
    pt_register('POST','TargetVendors');
    pt_register('POST','TargetEmployees');
    pt_register('POST','TargetFamily');
    pt_register('POST','BusinessDescription');
    pt_register('POST','FeaturesFlash');
    pt_register('POST','FeaturesVideo');
    pt_register('POST','FeaturesPhotoGal');
    pt_register('POST','FeaturesMessageB');
    pt_register('POST','FeaturesShopping');
    pt_register('POST','FeaturesOrders');
    pt_register('POST','FeaturesPoll');
    pt_register('POST','FeaturesExclusiveA');
    pt_register('POST','LogoDesign');
    pt_register('POST','WebColors');
    pt_register('POST','ConvertVideo');
    pt_register('POST','ScanPhotos');
    pt_register('POST','ProfessionalWriter');
    pt_register('POST','OwnStaffPrepare');
    pt_register('POST','PurchaseStockPhotos');
    pt_register('POST','ProfessionalImages');
    pt_register('POST','OwnPhotos');
    pt_register('POST','OtherContent');
    pt_register('POST','RegisterDomain');
    pt_register('POST','WebsiteHosting');
    pt_register('POST','OtherServices');
    pt_register('POST','UpdateSchedule');
    pt_register('POST','WebMaintenance');pt_register('POST','TimeFrame');
    pt_register('POST','Comments');
    $Comments=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $Comments);pt_register('POST','Name');
    pt_register('POST','Phone');
    if($Email=="" || $Name=="" || $Phone=="" ){
    $errors=1;
    $error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
    }
    if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$Email)){
    $error.="<li>Invalid email address entered";
    $errors=1;
    }
    if($errors==1) echo $error;
    else{
    $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
    $message="Email: ".$Email."
    Name: ".$Name."
    Company: ".$Company."
    Address: ".$Address."
    City: ".$City."
    Country: ".$Country."
    Phone Number: ".$Phone."
    Fax: ".$Fax."
    New Redesign: ".$NewRedesign."
    Url: ".$Url."
    Pages: ".$Pages."
    Target Existing and potential customers or members
    : ".$TargetExisting."
    Target Dealers and re-sellers: ".$TargetDealers."
    Target Vendors and Suppliers: ".$TargetVendors."
    Target Employees: ".$TargetEmployees."
    Target Family: ".$TargetFamily."
    Business Description: ".$BusinessDescription."
    Features Flash: ".$FeaturesFlash."
    Features Video: ".$FeaturesVideo."
    Features PhotoGallery: ".$FeaturesPhotoGal."
    Features MessageBoard: ".$FeaturesMessageB."
    Features Shopping Cart: ".$FeaturesShopping."
    Features Order forms for customer purchases: ".$FeaturesOrders."
    Features Polls and surveys for visitor voting: ".$FeaturesPoll."
    Features Exclusive area for members: ".$FeaturesExclusiveA."
    Logo Design: ".$LogoDesign."
    Website Colors and Layout: ".$WebColors."
    Convert videos to digital format: ".$ConvertVideo."
    Scan Photos: ".$ScanPhotos."
    Professional Content Writer: ".$ProfessionalWriter."
    Own Staff Prepare Content: ".$OwnStaffPrepare."
    Purchase Stock Photos: ".$PurchaseStockPhotos."
    Professional professional for custom artworks: ".$ProfessionalImages."
    Own Photos: ".$OwnPhotos."
    Other Content: ".$OtherContent."
    Register Domain Name: ".$RegisterDomain."
    Website Hosting: ".$WebsiteHosting."
    Other Services: ".$OtherServices."
    Update Schedule: ".$UpdateSchedule."
    Web Maintenance: ".$WebMaintenance."
    Time Frame: ".$TimeFrame."
    Comments: ".$Comments."
    ";
    $message = stripslashes($message);
    mail("photos@canz.biz","Quote Request",$message,"From: Website");
    header("Refresh: 0;url=content.php?pageid=64");
    ?><?php
    }
    ?>

  4. #4
    SitePoint Enthusiast canz's Avatar
    Join Date
    Mar 2005
    Location
    New Zealand
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi All.
    We have worked out how to get the word "on" to change to Yes, and also how to get the results to show accross the page, there's only one problem left. How do you get the results to miss out options not selected.

    Lynny
    www.canzdesign.com

  5. #5
    monitormensch oerdec's Avatar
    Join Date
    Sep 2004
    Location
    Hamburg
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try this for example:
    PHP Code:
    if (isset($Country)) {
      echo 
    "Country: ".$Country;

    or maybe this:
    PHP Code:
    if (isset($Country) && strlen($Country) > 1) {
      echo 
    "Country: ".$Country;

    oerdec

  6. #6
    SitePoint Enthusiast canz's Avatar
    Join Date
    Mar 2005
    Location
    New Zealand
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh boy, it didn't take long to get lost....

    where do I put this code,
    pt_register('POST','Company'); if (isset($Country)) {
    echo
    "Country: ".$Country;
    }

    and change it for each entry, or instead of the first code, or something different again.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •