Contact form in Project Siena

Hey guys. Could you tell me step by step how to create contact form in Project Siena?

Hello and welcome to Project Siena!
Awhile back someone posted this on YouTube:
http://www.youtube.com/watch?v=lJg0C_DnjWk
It was done in Beta 1 but the concepts I believe still hold true for Beta 3 and should get you started on what you're trying to do.
Keep us posted and let us know what additional questions you have -
Thor

Similar Messages

  • Surface Pro 3, Project Siena Apps, Need CSS for that form factor ASAP please

    Now that the Surface Pro 3 is out, I really don't like the black bars that appear above and below Project Siena Apps.
    I don't know enough to figure out how *I* can edit the CSS which currently states:
    #publishedCanvas {
        /* TASK: 73670: Add support for different form factors. */
        width: 1366px;
        height: 768px;
        background-color: transparent;
    but I'd like the code I should use (at my own risk, I know) to fix the CSS for all my apps.
    Please, MS folks or anyone?
    -- Barb Bowman

    Now that the Surface Pro 3 is out, I really don't like the black bars that appear above and below Project Siena Apps.
    I don't know enough to figure out how *I* can edit the CSS which currently states:
    #publishedCanvas {
        /* TASK: 73670: Add support for different form factors. */
        width: 1366px;
        height: 768px;
        background-color: transparent;
    but I'd like the code I should use (at my own risk, I know) to fix the CSS for all my apps.
    Please, MS folks or anyone?
    -- Barb Bowman

  • Contact form-checkbox PHP coding doesnt work

    I am a beginner to web page design so i would be grateful if you can explain to me what PHP coding i would need for 'Checkbox' and where to place it in the PHP coding below. I can submit the form to my email with all the headings and the filled in forms with checkbox Yes or No.
    Only problem i have is that part of the check box info appear right at the top of the email message rather than the 'Name', 'Tel', 'Email' etc..Another half of the checkbox appear where it suppose to be wih double heading as shown below. I would also like to remove the <br> from the email message. Can you also tell me how to change the colour for heading so its clear.
    I have marked the checkbox code in BLUE for both HTML and PHP coding below. Sorry for the long coding. Look forward to hearing from someone. Much appreciated.
    Message delivered to the email address as received:
    Rear ground extension: Yes
    Two-storey rear extension: Yes
    Two-storey side extension: No
    Loft: Yes
    New Build: Yes
    Other: Yes
    Name: Test<br>
    Email: [email protected]<br>
    Contact No: 87576as<br>
    Address1: addy1<br>
    Address2: addy2<br>
    Town: town<br>
    County: county<br>
    Postcode: post<br>
    Property Type: Cottage<br>
    Property Area: None<br>
    Message:<br>
    test msg
    My HTML coding for the form:
    <div class="contactForm">
          <form id="form1" name="form1" method="post" action="test2.php">
            <fieldset>
              <legend><strong>Personal Information</strong></legend>
              <table width="690" border="0">
                <tr>
                  <td width="340"><p>
                <label for="name" class="contactLable">Name:</label>
                <input name="name" type="text" id="name" tabindex="10" size="30" />
              </p></td>
                  <td width="340"><p>
                <label for="contact_number" class="contactLable">Contact No:</label>
                <input name="contact_number" type="text" id="contact_number" tabindex="20" size="30" />
              </p></td>
                </tr>
              </table>
              <table width="690" border="0">
                <tr>
                  <td><p>
                <span id="sprytextfield1">
                <label for="email" class="contactLable">Email:</label>
                <input name="email" type="text" id="email" tabindex="30" size="30" />
              <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span> </p></td>
                </tr>
              </table>
            </fieldset>
            <fieldset>
              <legend><strong>Project Information</strong></legend>
              <p><table width="690" border="0">
      <tr>
        <td width="340"><p>
                <label for="address1" class="contactLable">Address 1:</label>
                <input name="address1" type="text" id="address1" tabindex="40" size="30" />
              </p></td>
        <td width="340"> <p>
                <label for="address2" class="contactLable">Address 2:</label>
                <input name="address2" type="text" id="address2" tabindex="50" size="30" />
              </p></td>
      </tr>
      <tr>
        <td><p>
                <label for="town" class="contactLable">Town:</label>
                <input name="town" type="text" id="town" tabindex="60" size="30" />
              </p></td>
        <td><p>
                <label for="county" class="contactLable">County:</label>
                <input name="county" type="text" id="county" tabindex="70" size="30" />
              </p></td>
      </tr>
      <tr>
        <td><p>
                <label for="postcode" class="contactLable">Post Code:</label>
                <input name="postcode" type="text" id="postcode" tabindex="80" size="10" />
              </p></td>
        <td> </td>
      </tr>
      <tr>
        <td><p>
                <label for="propertyType" class="contactLable">Property Type:</label>
                <select name="propertyType" id="propertyType" tabindex="90">
                  <option>Please select</option>
                  <option>Detached</option>
                  <option>Semi-Detached</option>
                  <option>End of Terrace</option>
                  <option>Mid-Terrace</option>
                  <option>Flat</option>
                  <option>Bungalow</option>
                  <option>Cottage</option>
                  <option>Other</option>
                </select>
              </p></td>
        <td><p>
                <label for="propertyArea" class="contactLable">Property Area:</label>
                <select name="propertyArea" id="propertyArea" tabindex="100">
                  <option>Please select</option>
                  <option>None</option>
                  <option>Listed Building</option>
                  <option>Conservation Area</option>
                </select>
              </p></td>
      </tr>
    </table>
    </p>
           </fieldset><fieldset><legend><strong>Project Type</strong></legend>
              <table width="690">
                <tr>
                  <td width="338"><label>
                    <input name="rearExt" type="checkbox" class="contactCheckbox" id="CheckboxGroup1_0" tabindex="110" value="rearExt"/>
                  Rear ground extension</label></td>
                  <td width="340"><input name="sideExt" type="checkbox" class="contactCheckbox" id="CheckboxGroup1_1" tabindex="120" value="sideExt"/>
    Side ground extension</td>
                </tr>
                <tr>
                  <td><input name="twoStoreyRear" type="checkbox" class="contactCheckbox" id="twoStoreyRear" tabindex="130" value="twoStoreyRear"/>
    Two-storey rear extension</td>
                  <td><input name="twoStoreySide" type="checkbox" class="contactCheckbox" id="twoStoreySide" tabindex="140" value="twoStoreySide"/>
    Two-storey side extension</td>
                </tr>
                <tr>
                  <td><input name="loft" type="checkbox" class="contactCheckbox" id="loft" tabindex="150" value="loft"/>
    Loft conversion </td>
                  <td><input name="newBuild" type="checkbox" class="contactCheckbox" id="newBuild" tabindex="160" value="newBuild"/>
    New build </td>
                </tr>
                <tr>
                  <td><input name="flat" type="checkbox" class="contactCheckbox" id="flat" tabindex="170" value="flat"/>
    Flat conversion</td>
                  <td><input name="other" type="checkbox" class="contactCheckbox" id="other" tabindex="180" value="other"/>
    Other conversion</td>
                </tr>
              </table>
            </fieldset>
            <fieldset><legend><strong>Message</strong></legend>
              <p>
                <label for="message" class="contactLable">Your Message or Comments:</label>
                <textarea name="message" id="message" cols="45" rows="5" tabindex="190"></textarea>
              </p>
            </fieldset>
            <br />
            <input type="submit" name="Sumbit" id="Sumbit" value="Submit" tabindex="200" />
          </form>
        </div>
    PHP Coding to send to my email:
    <!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 HTTP-EQUIV="refresh" content="0;URL=thankyou.html">
    <title>Email Form</title>
    </head>
    <body>
    <?php
      $name=addslashes($_POST['name']);
      $contact_number=addslashes($_POST['contact_number']);
      $email=addslashes($_POST['email']);
      $address1=addslashes($_POST['address1']);
      $address2=addslashes($_POST['address2']);
      $town=addslashes($_POST['town']);
      $county=addslashes($_POST['county']);
      $postcode=addslashes($_POST['postcode']);
      $propertyType=addslashes($_POST['propertyType']);
      $propertyArea=addslashes($_POST['propertyArea']);
      $rearExt=($_POST['rearExt'])?"Rear ground extension: Yes":"Rear ground extension: No";
      $sideExt=($_POST['sideExt'])?"Side ground extension: Yes":"Side ground extension: No";
      $twoStoreyRear=($_POST['twoStoreyRear'])?"Two-storey rear extension: Yes":"Two-storey rear extension: No";
      $twoStoreySide=($_POST['twoStoreySide'])?"Two-storey side extension: Yes":"Two-storey side extension: No";
      $loft=($_POST['loft'])?"Loft: Yes":"Loft: No";
      $newBuild=($_POST['newBuild'])?"New Build: Yes":"New Build: No";
      $flat=($_POST['flat'])?"Flat: Yes":"Flat: No";
      $other=($_POST['other'])?"Other: Yes":"Other: No";
      $msg.="\n$rearExt\n$wsideExt\n$twoStoreyRear\n$twoStoreySide\n$loft\n$newBuild\n$wflat\n$ other";
      $message=addslashes($_POST['message']);
    // you can specify which email you want your contact form to be emailed to here
      $toemail = "[email protected]";
      $subject = "From Website Test";
      $headers = "MIME-Version: 1.0\n"
                ."From: \"".$name."\" <".$email.">\n"
                ."Content-type: text/html; charset=iso-8859-1\n";
      $body = "Name: ".$name."<br>\n"
                ."Email: ".$email."<br>\n"
                ."Contact No: ".$contact_number."<br>\n"
                ."Address1: ".$address1."<br>\n"
                ."Address2: ".$address2."<br>\n"
                ."Town: ".$town."<br>\n"
                ."County: ".$county."<br>\n"
                ."Postcode: ".$postcode."<br>\n"
                ."Property Type: ".$propertyType."<br>\n"
                ."Property Area: ".$propertyArea."<br>\n"
                ."Rear ground extension: ".$rearExt."<br>\n"
                ."Side ground extension: ".$sideExt."<br>\n"
                ."Two-storey rear extension: ".$twoStoreyRear."<br>\n"
                ."Two-storey side extension: ".$twoStoreySide."<br>\n"
                ."Loft conversion: ".$loft."<br>\n"
                ."New build: ".$newBuild."<br>\n"
                ."Flat: ".$flat."<br>\n"
                ."Other: ".$other."<br>\n"
                ."Message:<br>\n"
                .$message;
      if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
        echo "That is not a valid email address.  Please return to the"
               ." previous page and try again.";
        exit;
        mail($toemail, $subject, $body, $msg, $headers);
        echo "Thanks for submitting your comments";
    ?>
    </body>
    </html>

    Dear David
    Thank you so much for the clear explanation. I have been using Lynda.com Dreamweaver CS5 tutorial. I found the coding for checkbox through search and added to the coding from Lynda.com tutorial.
    I made few changes to the coding by removing:
    $msg = "$rearExt<br>\r\n$sideExt<br>\r\n$twoStoreyRear<br>\r\n
              $twoStoreySide<br>\r\n$loft<br>\r\n$newBuild<br>\r\n$flat<br>\r\n$other\r\n";
    as the email message shows the results from the checkbox twice.
    I also removed the <br> from:
    $body = "Name: $name<br>\r\n
              Email: $email<br>\r\n
              Contact No: $contact_number<br>\r\n
             Other: $other\r\n
              Message:\r\n
                $message";
    I have add the result and the PHP coding you have helped to fixed for anyone needing a working PHP code containing Text Fields, Drop Down List, Checkbox and Text Area. Many thanks for all your help. If you have a coding to change the heading text colour I very much appericate it.
    Message sent to email:
              From: Name test <[email protected]>
                 Content-type: text/html; charset=iso-8859-1
    Name: Name test
              Email: [email protected]
                      Contact No: 0123456789
                      Address1: addy1
                      Address2: addy2
                      Town: T
                      County: C
                      Postcode: P/C
                      Property Type: End of Terrace
                      Property Area: Listed Building
                      Rear ground extension: Rear ground extension: No
                     Side ground extension: Side ground extension: No
                     Two-storey rear extension: Two-storey rear extension: Yes
                     Two-storey side extension: Two-storey side extension: No
                     Loft conversion: Loft conversion: No
                     New build: New Build: No
                     Flat: Flat: Yes
                     Other: Other: No
             Message:
               Test message
    PHP coding for customer contact page:
    <!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 HTTP-EQUIV="refresh" content="0;URL=thankyou.html">
    <title>Email Form</title>
    </head>
    <body>
    <?php
      $name=$_POST['name'];
      $contact_number=$_POST['contact_number'];
      $email=$_POST['email'];
      $address1=$_POST['address1'];
      $address2=$_POST['address2'];
      $town=$_POST['town'];
      $county=$_POST['county'];
      $postcode=$_POST['postcode'];
      $propertyType=$_POST['propertyType'];
      $propertyArea=$_POST['propertyArea'];
      $rearExt= isset($_POST['rearExt'])?"Rear ground extension: Yes":"Rear ground extension: No";
      $sideExt= isset($_POST['sideExt'])?"Side ground extension: Yes":"Side ground extension: No";
      $twoStoreyRear= isset($_POST['twoStoreyRear'])?"Two-storey rear extension: Yes":"Two-storey rear extension: No";
      $twoStoreySide= isset($_POST['twoStoreySide'])?"Two-storey side extension: Yes":"Two-storey side extension: No";
      $loft= isset($_POST['loft'])?"Loft conversion: Yes":"Loft conversion: No";
      $newBuild= isset($_POST['newBuild'])?"New Build: Yes":"New Build: No";
      $flat= isset($_POST['flat'])?"Flat: Yes":"Flat: No";
      $other= isset($_POST['other'])?"Other: Yes":"Other: No";
      $message=$_POST['message'];
    // you can specify which email you want your contact form to be emailed to here
      $toemail = "[email protected]";
      $subject = "From Website Test";
      $headers = "MIME-Version: 1.0\r\n
                 From: $name <".$email.">\r\n
                 Content-type: text/html; charset=iso-8859-1";
      $body = "Name: $name\r\n
              Email: $email\r\n
              Contact No: $contact_number\r\n
              Address1: $address1\r\n
              Address2: $address2\r\n
              Town: $town\r\n
              County: $county\r\n
              Postcode: $postcode\r\n
              Property Type: $propertyType\r\n
              Property Area: $propertyArea\r\n
              Rear ground extension: $rearExt\r\n
              Side ground extension: $sideExt\r\n
              Two-storey rear extension: $twoStoreyRear\r\n
              Two-storey side extension: $twoStoreySide\r\n
              Loft conversion: $loft\r\n
              New build: $newBuild\r\n
              Flat: $flat\r\n
              Other: $other\r\n
              Message:\r\n
                $message";
      if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
        echo "That is not a valid email address.  Please return to the"
               ." previous page and try again.";
        exit;
        mail($toemail, $subject, $body, $headers);
        echo "Thanks for submitting your message";
    ?>
    </body>
    </html>

  • Can I convert Twitter time Text to Project Siena's Date Value ?

    Can I convert Twitter time Text to Project Siena's Date Value ?
    I want to show localtime of Twitter created_at.
    Twitter time text = ThisItem!created_at , ex: Tue Jul 15 17:19:00 +0000 2014
    I want to show 2014/07/16 02:19 by Japan localtime.
    Regards,
    Yoshihiro Kawabata

    Siena uses JavaScript to parse date/times, via the TimeValue function. A good specification regarding what is acceptable can be found here:
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse
    The example above is truly bizarre: I thought I had seen it all. You will need to turn that form into one of those listed on the above site, using string functions to chop it up and reassemble it into a saner form.

  • Help importing SWF / FLA contact form into FLA file.

    I've been trying to import, embed, or load a contact form into a fla flash website (i have the fla and files) however i cant seem to get it to work.
    The form is separate file, I have the fla source file for it as well.
    I'm using Actionscript 3. I would like to have the form dynamical load into my existing project/page - http://www.photorexit.com/site/contact/contact
    Here is the contact form page - http://www.photorexit.com/site/contact/contact_page.html
    any suggestions?
    -Jason

    The contact_page.fla page is a template contact file I purchased on the net.
    I spent most of the morning going through the files and I cant seem to pin point why the contact_page is trying to load contact.swf from my local computer.
    I assume it has something to do with the "contact_page" ContactPage.as file and the Monitor.as file.
    I have to admit, I'm in over my head...
    -Jason
    ContactPage.as
    package as3{
        import flash.display.Sprite;
        import flash.display.MovieClip;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
        import flash.text.TextField;
        import flash.text.TextFieldAutoSize;
        import flash.events.Event;
        import flash.events.IOErrorEvent;
        import flash.events.MouseEvent;
        import flash.net.URLLoader;
        import flash.net.URLRequest;
        import flash.net.navigateToURL;
        import flash.utils.Timer;
        import flash.geom.ColorTransform;
        import caurina.transitions.Tweener;
        import caurina.transitions.properties.ColorShortcuts;
        ColorShortcuts.init();
        public class ContactPage extends Sprite {
            public var itemsPath:String='';
            private var xmlCOLORS_DFT:String = 'colors.xml';
            private var colorStatus:Boolean=false;
            public var color_dfr:Object=new Object();
            private var xmMAIN_XML_PATH:String = 'cgal.xml';
            private var mainXMLStatus:Boolean=false;
            public var xmlDate:Array = [];
            private var mainTitle:String='';
            private var bg:BG;
            private var monitor:Monitor;
            public var footerMenu:FooterMenu;
            private var b_colorOut:uint;
            private var b_colorOver:uint;
            public var container:MovieClip;
            public var closeF:Function;
            public var monitorHeight:int=0;
            public var monitorWidth:int=0;
            public var email_for_contact_form:String;
            public function ContactPage() {
                addEventListener(Event.ENTER_FRAME, aplLoading);
                addEventListener(Event.REMOVED_FROM_STAGE, remove);
            private function remove(e:Event):void {
                trace(this);
                removeEventListener(Event.ENTER_FRAME, aplLoading);
                removeEventListener(Event.ENTER_FRAME, loading);
                stage.removeEventListener(Event.RESIZE, appResizeHandler);
            private function aplLoading(e:Event):void {
                var bytesTotal = stage.loaderInfo.bytesTotal;
                var bytesLoaded = stage.loaderInfo.bytesLoaded;
                var percentLoaded : Number = Math.floor(Math.round( bytesLoaded/bytesTotal ));
                if (percentLoaded==1) {
                    if (parent!=stage) {
                        closeF= Object(parent).goBG;
                        container = Object(parent).div;
                        xmlCOLORS_DFT =  Object(parent).xmlCOLORS_DFT;
                        xmMAIN_XML_PATH = Object(parent).xmMAIN_XML_PATH;
                        itemsPath=Object(parent).itemsPath;
                    init();
                    removeEventListener(Event.ENTER_FRAME, aplLoading);
            public function init() {
                stage.scaleMode = StageScaleMode.NO_SCALE;
                stage.align = StageAlign.TOP_LEFT;
                stage.addEventListener(Event.RESIZE, appResizeHandler);
                footerMenu = new FooterMenu();
                monitor = new Monitor();
                bg = new BG();
                bg.alpha=0;
                addChild(bg);
                appResizeHandler();
                var mainLoader:URLLoader = new URLLoader();
                mainLoader.addEventListener( Event.COMPLETE, onMainXMLLoad );
                mainLoader.addEventListener(IOErrorEvent.IO_ERROR, errorTrace);
                mainLoader.load( new URLRequest(xmMAIN_XML_PATH) );
                var colorLoader:URLLoader = new URLLoader();
                colorLoader.addEventListener( Event.COMPLETE, onColorXMLLoad );
                colorLoader.addEventListener(IOErrorEvent.IO_ERROR, errorTrace);
                colorLoader.load( new URLRequest(xmlCOLORS_DFT) );
            public function colorCgange(obj:Object, color:uint):void {
                var colorTransform:ColorTransform = new ColorTransform();
                colorTransform.color = color;
                obj.transform.colorTransform = colorTransform;
            private function onColorXMLLoad( event:Event ):void {
                try {
                    var mainData:XML = new XML( event.target.data );
                    for (var i:int; i<mainData.elements().length(); i++) {
                        var attribCol:Object = {};
                        for each (var attribute:XML in mainData.elements()[i].attributes()) {
                            attribCol[attribute.name().toString()] = attribute.valueOf().toString();
                        color_dfr[mainData.elements()[i].name().toString()] = attribCol;
                    colorStatus = true;
                    addEventListener(Event.ENTER_FRAME, loading);
                } catch (e:Error) {
                    errorTrace("Couldn't load the Color XML file.<br/>"+e.message);
                    trace( 'Color XML Loading Error: ' + e.message );
                    return;
            private function onMainXMLLoad( event:Event ):void {
                try {
                    var mainData:XML = new XML( event.target.data );
                    mainTitle = [email protected]();
                    if (Boolean([email protected]())) {
                        monitorWidth = parseInt([email protected]());
                    if (Boolean([email protected]())) {
                        monitorHeight = parseInt([email protected]());
                    if (Boolean(mainData.@email_for_contact_form.toString())) {
                        email_for_contact_form = mainData.@email_for_contact_form.toString();
                    } else {
                        errorTrace("There is no e-mail address.");
                        trace( "There is no e-mail address.");
                        return;
                    for (var i:int=0; i<mainData.elements().length(); i++) {
                        xmlDate[i] = {title:mainData.elements()[i][email protected](), cont:mainData.elements()[i]};
                    mainXMLStatus = true;
                    addEventListener(Event.ENTER_FRAME, loading);
                } catch (e:Error) {
                    errorTrace("Couldn't load the Main XML file.<br/>"+e.message);
                    trace( 'Main XML Loading Error: ' + e.message );
                    return;
            private function loading(e:Event):void {
                if (mainXMLStatus && colorStatus) {
                    removeEventListener(Event.ENTER_FRAME, loading);
                    if (Boolean(color_dfr.background.color.length)) {
                        Tweener.addTween(bg,{_color:color_dfr.background.color, alpha:1, time:1});
                    } else {
                        bg.alpha=0;
                    monitor.alpha = 0;
                    footerMenu.alpha= 0;
                    addChild(monitor);
                    colorCgange(monitor.txt, color_dfr.mainTitle.textColor);
                    monitor.txt.text = mainTitle;
                    monitor.init();
                    monitor.addChild(footerMenu);
                    b_colorOver = uint(color_dfr.buttons.mouseOver);
                    b_colorOut = uint(color_dfr.buttons.mouseOut);
                    Tweener.addTween(monitor,{alpha:1,time:1});
                    Tweener.addTween(footerMenu,{alpha:1,time:1, delay:.7});
            function buttonRoll(e:MouseEvent):void {
                var button = e.currentTarget;
                switch (e.type) {
                    case "mouseOut" :
                        colorCgange(button.img,b_colorOut);
                        break;
                    case "mouseOver" :
                        colorCgange(button.img,b_colorOver);
                        break;
            public function errorTrace(txt:String):void {
                var err_txt:TextField= new TextField();
                err_txt.width = 300;
                err_txt.autoSize = TextFieldAutoSize.LEFT;
                err_txt.wordWrap = true;
                err_txt.htmlText = '<p align = "center"><font color="#ff0000" size="24">' + txt+ '</font></p>';
                err_txt.x = (stage.stageWidth-err_txt.width)/2;
                err_txt.y = (stage.stageHeight-err_txt.height)/2;
                addChild(err_txt);
            private function appResizeHandler(e:Event=null):void {
                if (container) {
                    bg.width = container.width;
                    bg.height = container.height;
                } else if(stage) {
                    bg.width = stage.stageWidth;
                    bg.height = stage.stageHeight;
    Monitor.as
    package as3{
        import flash.display.MovieClip;
        import flash.display.StageAlign;
        import flash.display.Bitmap;
        import flash.display.BitmapData;
        import flash.display.Loader;
        import flash.display.LoaderInfo;
        import flash.text.TextField;
        import flash.text.TextFieldAutoSize;
        import flash.text.TextFormat;
        import flash.events.FocusEvent;
        import flash.events.ProgressEvent;
        import flash.events.IOErrorEvent;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.net.URLLoader;
        import flash.net.URLRequest;
        import flash.net.URLVariables;
        import flash.net.URLLoaderDataFormat;
        import flash.net.URLRequestMethod;
        import flash.utils.Timer;
        import flash.events.TimerEvent;
        import flash.geom.ColorTransform;
        import caurina.transitions.Tweener;
        public class Monitor extends MovieClip {
            private var itemsPath:String;
            private var mainObj:Object;
            private var b_colorOver:uint;
            private var b_colorOut:uint;
            private var mainTitle:uint;
            private var itemTitle:uint;
            private var itemDescription:uint;
            private var xmlData:Array;
            private var container:MovieClip;
            private var mail:String;
            private var loader:URLLoader = new URLLoader();
            private var req:URLRequest = new URLRequest("contactPro.php");
            private var variables:URLVariables = new URLVariables();
            private var senderRpl:String="No";
            private var form_field_arr:Array=['txt_name', 'txt_phone','txt_email', 'txt_message'];
            private var form_def_cont_arr:Array=[];
            private var form_err_arr:Array=["Username Required","","Missing Field/Invalid E-mail", "Message Required"];
            public function Monitor() {
                b_close.visible=false;
                addEventListener(Event.ADDED_TO_STAGE, toStage);
            private function toStage(e:Event):void {
                mainObj = parent;
                container = mainObj.container;
                if (container) {
                    itemsPath = mainObj.itemsPath;
                    req = new URLRequest(itemsPath+"/contactPro.php");
                    b_close.alpha=0;
                    b_close.visible=true;
                    Tweener.addTween(b_close, {alpha:1, time:1});
                    mainObj.footerMenu.visible=false;
                xmlData = mainObj.xmlDate;
                mail = mainObj.email_for_contact_form;
                b_colorOver = uint(mainObj.color_dfr.buttons.mouseOver);
                b_colorOut = uint(mainObj.color_dfr.buttons.mouseOut);
                mainTitle = uint(mainObj.color_dfr.mainTitle.textColor);
                itemTitle= uint(mainObj.color_dfr.itemTitle.textColor);
                itemDescription= uint(mainObj.color_dfr.itemDescription.textColor);
                var contactFtextColor:uint = uint(mainObj.color_dfr.inoutTextField.textColor);
                var contactFbgColor:uint = uint(mainObj.color_dfr.inoutTextField.bgColor);
                var contactFbrColor:uint = uint(mainObj.color_dfr.inoutTextField.borderColor);
                ///mainObj.colorCgange(b_close.img, b_colorOut);
                mainObj.colorCgange(contactForm.mc_buttons.b_clear.img, b_colorOut);
                mainObj.colorCgange(contactForm.mc_buttons.b_submit.img, b_colorOut);
                b_close.buttonMode=true;
                b_close.addEventListener(MouseEvent.CLICK, fClose);
                b_close.addEventListener(MouseEvent.MOUSE_OVER,buttonRoll);
                b_close.addEventListener(MouseEvent.MOUSE_OUT,buttonRoll);
                contactForm.mc_buttons.b_clear.addEventListener(MouseEvent.MOUSE_OVER,buttonRoll);
                contactForm.mc_buttons.b_clear.addEventListener(MouseEvent.MOUSE_OUT,buttonRoll);
                contactForm.mc_buttons.b_submit.addEventListener(MouseEvent.MOUSE_OVER,buttonRoll);
                contactForm.mc_buttons.b_submit.addEventListener(MouseEvent.MOUSE_OUT,buttonRoll);
                item_1.autoSize = TextFieldAutoSize.LEFT;
                item_1.wordWrap=true;
                item_1.mouseWheelEnabled=false;
                item_2.autoSize = TextFieldAutoSize.LEFT;
                item_2.wordWrap=true;
                item_2.mouseWheelEnabled=false;
                item_3.autoSize = TextFieldAutoSize.LEFT;
                item_3.wordWrap=true;
                item_3.mouseWheelEnabled=false;
                textFieldFormat(item_1, itemDescription);
                textFieldFormat(item_2, itemDescription);
                textFieldFormat(item_3, itemDescription);
                textFieldFormat(title_1, itemTitle);
                textFieldFormat(title_2, itemTitle);
                textFieldFormat(contactForm.txError, itemTitle);
                contactForm.txt_name.borderColor = contactFbrColor;
                contactForm.txt_name.backgroundColor = contactFbgColor;
                contactForm.txt_phone.borderColor = contactFbrColor;
                contactForm.txt_phone.backgroundColor = contactFbgColor;
                contactForm.txt_email.borderColor = contactFbrColor;
                contactForm.txt_email.backgroundColor = contactFbgColor;
                contactForm.txt_message.borderColor = contactFbrColor;
                contactForm.txt_message.backgroundColor = contactFbgColor;
                textFieldFormat(contactForm.txt_name, contactFtextColor);
                textFieldFormat(contactForm.txt_phone, contactFtextColor);
                textFieldFormat(contactForm.txt_email, contactFtextColor);
                textFieldFormat(contactForm.txt_message, contactFtextColor);
                contactForm.txt_message.wordWrap=true;
                appResizeHandler();
                stage.addEventListener(Event.RESIZE, appResizeHandler);
            private function textFieldFormat(tField:TextField, color:uint):void {
                var format:TextFormat = new TextFormat();
                format.color = color;
                tField.defaultTextFormat = format;
            function buttonRoll(e:MouseEvent):void {
                var button = e.currentTarget;
                switch (e.type) {
                    case "mouseOut" :
                        if(button.name == "b_close"){
                            button.img.transform.colorTransform = new ColorTransform();
                        }else{
                            mainObj.colorCgange(button.img, b_colorOut);
                        break;
                    case "mouseOver" :
                        mainObj.colorCgange(button.img, b_colorOver);
                        break;
            private function fClose(e:MouseEvent):void {
                mainObj.closeF()
            public function init():void {
                var i:int=0;
                title_1.text = xmlData[0].title;
                title_2.text = xmlData[1].title;
                for (i=0; i<xmlData[0].cont.elements().length(); i++) {
                    this['item_'+(i+1)].htmlText = xmlData[0].cont.elements()[i];
                for (i=0; i<xmlData[1].cont.elements().length(); i++) {
                    form_def_cont_arr[i]=xmlData[1].cont.elements()[i];
                loader.dataFormat = URLLoaderDataFormat.VARIABLES;
                req.method = URLRequestMethod.POST;
                contactForm.mc_buttons.b_clear.buttonMode = true;
                contactForm.mc_buttons.b_submit.buttonMode = true;
                contactForm.mc_buttons.b_clear.addEventListener(MouseEvent.MOUSE_DOWN, text_field_clear);
                contactForm.mc_buttons.b_submit.addEventListener(MouseEvent.MOUSE_DOWN, sendForm);
                for (i=0; i<form_field_arr.length; i++) {
                    contactForm[form_field_arr[i]].tabIndex = i;
                    contactForm[form_field_arr[i]].text= form_def_cont_arr[i] ;
                    contactForm[form_field_arr[i]].addEventListener(FocusEvent.FOCUS_IN, onFocus);
                    contactForm[form_field_arr[i]].addEventListener(FocusEvent.FOCUS_OUT, outFocus);
                    contactForm[form_field_arr[i]].addEventListener(Event.CHANGE, txErrorCheck);
                appResizeHandler();
            private function txErrorCheck(event:Event):void {
                if (contactForm.txError.text.length>0) {
                    contactForm.txError.text = "";
            private function onFocus(event:FocusEvent):void {
                //trace('dd')
                for (var i:int=0; i<form_field_arr.length; i++) {
                    if (event.target.name==form_field_arr[i]) {
                        var text_field_index = i;
                if (contactForm[form_field_arr[text_field_index]].text==form_def_cont_arr[text_field_index]) {
                    contactForm[form_field_arr[text_field_index]].text='';
            private function outFocus(event:FocusEvent):void {
                for (var i:int=0; i<form_field_arr.length; i++) {
                    if (event.target.name==form_field_arr[i]) {
                        var text_field_index = i;
                if (contactForm[form_field_arr[text_field_index]].text=='') {
                    contactForm[form_field_arr[text_field_index]].text=form_def_cont_arr[text_field_index];
            private function text_field_clear(event:Event=null):void {
                for (var i:int=0; i<form_field_arr.length; i++) {
                    contactForm[form_field_arr[i]].text= form_def_cont_arr[i] ;
                    contactForm.txError.text='';
            private function sendForm(evt:MouseEvent):void {
                if (contactForm[form_field_arr[0]].text<=0 || contactForm[form_field_arr[0]].text==form_def_cont_arr[0]) {
                    contactForm.txError.text =form_err_arr[0];
                } else if (!isValidEmail(contactForm[form_field_arr[2]].text)) {
                    contactForm.txError.text = form_err_arr[2];
                } else if (contactForm[form_field_arr[3]].text<=0 || contactForm[form_field_arr[3]].text==form_def_cont_arr[3]) {
                    contactForm.txError.text =form_err_arr[3];
                } else {
                    variables.to_mail = mail;
                    variables.senderName = contactForm[form_field_arr[0]].text;
                    variables.senderPhone = contactForm[form_field_arr[1]].text;
                    variables.senderEmail = contactForm[form_field_arr[2]].text;
                    variables.senderMsg = contactForm[form_field_arr[3]].text;
                    req.data = variables;
                    loader.addEventListener(IOErrorEvent.IO_ERROR, phpError);
                    loader.addEventListener(Event.COMPLETE, receiveLoad);
                    loader.load(req);
                    contactForm.txError.text = 'Submitting form.';
            private function phpError(e:IOErrorEvent):void {
                trace(e.text);
                contactForm.txError.text = e.text;
            private function receiveLoad(evt:Event):void {
                if (evt.target.data.retval == 1) {
                    contactForm.txError.text ="Form submitted.";
                    Tweener.addTween(contactForm, {delay:2, onStart:text_field_clear});
                } else {
                    contactForm.txError.text="**  ERROR SENDING MAIL **";
            private function isValidEmail(email:String):Boolean {
                var emailExpression:RegExp = /^[a-z][\w.-]+@\w[\w.-]+\.[\w.-]*[a-z][a-z]$/i;
                return emailExpression.test(email);
            private function appResizeHandler(e:Event=null):void {
                if (stage) {
                    var oWidth:Number = stage.stageWidth;
                    var oHeight:Number = stage.stageHeight;
                    if (container) {
                        oWidth = container.width;
                        oHeight = container.height;
                    if (mainObj.monitorHeight>0) {
                        bg.height =  mainObj.monitorHeight;
                    } else {
                        bg.height = oHeight-20;
                    if (mainObj.monitorWidth>0) {
                        bg.width = mainObj.monitorWidth;
                    } else {
                        !container?bg.width = oWidth-20:bg.width = oWidth-140;
                    b_close.y=0;
                    b_close.x = bg.x+bg.width+5;
                    txt.width = bg.width - 50;
                    header_bg.width =bg.width-6;
                    this.y =Math.round((oHeight-bg.height)/2);
                    this.x =Math.round((oWidth-bg.width)/2);
                    mainObj.footerMenu.x= bg.width-13;
                    mainObj.footerMenu.y= bg.height-13;
                    title_1.width = bg.width-40;
                    item_1.width = bg.width-40;
                    item_2.width = bg.width/2-30;
                    item_3.width = item_2.width;
                    item_3.x = item_2.x+item_2.width+20;
                    title_2.width = bg.width-40;
                    contactForm.txt_name.width = item_2.width;
                    contactForm.txt_phone.width = item_2.width;
                    contactForm.txt_email.width = item_2.width;
                    contactForm.txError.width = item_2.width;
                    contactForm.txt_message.width = item_2.width;
                    contactForm.txt_message.x=contactForm.txt_name.x+contactForm.txt_name.width+20;
                    contactForm.mc_buttons.x = Math.round(contactForm.txt_message.x+contactForm.txt_message.width-contactForm.mc_buttons .width);
                    item_1.y = title_1.y+title_1.height+10;
                    item_2.y = item_1.y+item_1.height+10;
                    item_3.y = item_1.y+item_1.height+10;
                    if (item_2.y+item_2.height>item_3.y+item_3.height) {
                        title_2.y = item_2.y+item_2.height+10;
                    } else {
                        title_2.y = item_3.y+item_3.height+10;
                    contactForm.y = Math.round(title_2.y+title_2.height+10);

  • Project Siena Support

    Hello
    I was wondering is there a support I can
    contact for Project Siena? Like Microsoft support...
    For the questions, I have posted here, and no one have
    answers for it.
    It would be great to have a direct contact to someone
    that had the "know how" for me, so I can finish my app, and publish
    it in several markets. It should be in Microsoft interest to help me to get
    there to, so I hope there is a support for Project Siena somewhere. Or how do Microsoft
    follow up on us newbie developers directly? It is important that I get this to
    work in a good way, so I do not give up on my project. I think I have a good
    one, that many will want to have on their devices!!
    Grettings from Norway -Tonheim-

    Those kind of details would not be available as of yet. At the Ignite conference would be the first opportunity to reveal those details, if they're available at all.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Is SWFOBject messing up my Flash/PHP 'contact form'?

    Hi all,
    First post, and first project using Flash!
    Here's the
    page I'm having problems with...
    It's an email contact page that uses a Flash contact form
    that I purchased from iStockphoto. The swf uses a PHP script that I
    keep in the same location on my server as the swf. The PHP sends
    the email to my specified address. In theory that should work fine,
    but in the interests of keeping things working across browsers, and
    maintaining my Validation, I've been calling the swf using
    SWFObject.
    However, something is screwed up. When I click on 'Send' on
    the successfully embedded Flash form, nothing happens. Neither my
    hosting providers nor the author of the flash have been able to
    work out why - although they both agree that SWFObject may have
    something to do with it.
    Please bear in mind that I'm REALLY new to Flash, although
    I'm by no means a technonewbie - tell me what I'm looking for and
    what to change and I can keep up, but someone posted the following
    on another forum I frequent and I have no idea what it means:
    quote:
    Submitting a form relies on either a post or get method,
    maybe SWFObject needs specific configuration to do this. If it
    doesn't support either of those two methods you may need to use an
    interim piece of javascript or something to accept the form
    variables then call your sendmail.
    Help much appreciated!
    Owen

    kglad,
    The actionscript calls the PHP form but dosen't post any information, it loads in the browser and I get the email but nothing in it?
    I'm just looking for the correct Actionscript to paste into flash and hopefully get it working. Thanks for the help.

  • AS 3.0 / C# Contact Form

    Hello there. I am trying to develop a contact form in AS 3.0 / C#. I already have my AS 3.0 code but I do not know where to start in the C# code. I could've easily done it in PHP, but the guy I'm doing this project for insisted that it should be in ASP.NET. I do know basic C# and ASP.NET but I'm still in the early stages of my ASP.NET learning. So, I would really appreciate some here. I'm not sure if there's some POST method in C# but that's what I'm looking for because that's how I'll be sending the variables from AS 3.0... here's my code:
    var variables:URLVariables = new URLVariables;
    var varSend:URLRequest = new URLRequest("//ASP filename");
    varSend.method = URLRequestMethod.POST;
    varSend.data = variables;
    var varLoader:URLLoader = new URLLoader;
    varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
    varLoader.addEventListener(Event.COMPLETE, completeHandler);
    function completeHandler(event:Event):void {
         name_txt.text = "";
         email_txt.text = "";
         message_txt.text = "";
         phone_txt.text = "";
         company_txt.text = "";
         status_txt.text = event.target.data.return_msg;
    submit_btn.addEventListener(MouseEvent.CLICK, ValidateAndSend);
    function ValidateAndSend (event:MouseEvent):void {
         if(!name_txt.length) {
              status_txt.text = "Please enter your name";
         } else if (!email_txt.length) {
              status_txt.text = "Please enter your email";
         } else if (!message_txt.length) {
              status_txt.text = "Please enter your message";
         } else {
              variables.userName = name_txt.text;
              variables.userEmail = email_txt.text;          
              variables.userMessage = message_txt.text;
              variables.userCompany = company_txt.text;
              variables.userPhone = phone_txt.text;
              varLoader.load(varSend);     

    quote:
    Originally posted by:
    Bentley Wolfe -ADOBE
    I received a bit more information.. the Slides/ Forms feature
    was -not- updated for AS3, and at this point to my knowledge there
    is no plan to update it. It's still AS2. A bit confusing, and I
    apologize for that. I believe the thinking is that the developer
    community will pick up on this and develop an AS3 replacement.
    Feel free to complain to
    http://www.adobe.com/go/wish.
    I would love for the development community to pick up on
    this, but this type of development is tied into the Flash IDE and
    therefore it would seem to me that Adobe must choose to update it
    to AS3. I have requested this feature be continued via your link.
    Thanks for your time and information!

  • Contact form check boxes will not work on a Tablet

    Hi there,
    I created a website (Desktop) and a mobile version (Phone).  I did not create one for a tablet but have relied on the Desktop version if someone views it on a Tablet.
    Here's the thing, I created a contact form with checkboxes.  It works great on a desktop (because people check the boxes with their mouse), however, it doesn't work on a Tablet, when you try and check the boxes with your finger.
    Help!

    Please share the site URL.

  • Changed Outlook Contact Form back to IPM.Contact - now I can't save contact in Public Folder

    I recently changed the Contact form that we were using back to the default IPM.Contact. I did this so that it  would be consistent for only a few of us had a custom contact template to use and it made it difficult to share contact information. After
    changing the contact default back to IPM.Contact and changing all the contacts to reflect the default Message class, no can add a contact to the Public Folder contact file. I have tried several different setting for the permsion. Publishing Author, Publish
    Editor, Owner, it still gives the error
    The item cannot be saved to this folder. The folder was deleted, or you do not have permission. Do you want to save a copy of it in the degfualt folder for the item.
    When I changed the form back to IPM.Contact  i ran the omglass.exe to change it on all the contacts in the public folder. 
    Please advise for no contacts can now be added to our company contact list

    Hi,
    Please right-click this public folder, click Properties. In the General tab, make sure the field of "When posting to this folder, use" is set to IPM.Contact.
    Please restart Outlook with Outlook /checkclient switch(Start > Run > type Outlook /checkclient and enter) to have a try. If it fails, please create a new Outlook profile to have a try:
    http://support.microsoft.com/kb/829918/en-us
    Regards,
    Winnie Liang
    TechNet Community Support

  • Creating a modern Contact Form in Dreamweaver or use an addon

    Hi
    I am looking for an easy way to create a modern contact form in Dreamweaver using and addon also will be fine
    Any ideas?
    I wan to create fields:
    Email:
    Drop down: with 3 options
    Simple text box
    Notes:
    Submit button
    Thanks

    Making HTML5 Forms in DW CC (video)
    http://tv.adobe.com/watch/learn-dreamweaver-cc/html5-forms-workflow/
    Making the HTML form is easy but the form processing script which collects data & sends it to your email is not quite so simple.   Start with your web host.  Ask them if they have form-to-email processing scripts you can use.  If they don't, find out which scripts your hosting plan supports (php, asp, asp.net, perl, coldfusion, etc...)
    Nancy O.

  • Contact Form (php)  - how to prevent new window...

    My contact form works just fine, however, I currently have
    the target set to "_blank" which is not what I want.
    Rather than opening the .php file open in a new window, I
    just want to go to a new frame (labeled "success" or "error")
    within my flash file (which currently works fine)
    So, my question is how do I send the form information to my
    php file WITHOUT having to open a new window outside of my flash
    file since I'm sending the user to new frame instead.
    FYI: I've already tried removing "_blank" but it still opens
    the php file in a new browser window.
    My code below:
    on (release){
    var my_lv:LoadVars = new LoadVars();
    my_lv.fullName = fullName_txt.text;
    my_lv.email = email_txt.text;
    my_lv.emailMessage = emailMessage_txt.text;
    if(fullName_txt.text != "" && email_txt.text != ""
    && emailMessage_txt.text != "") {
    my_lv.send("contact.php","_blank","POST");
    gotoAndStop("success");
    else {
    gotoAndStop("error");
    Any help is greatly appreciated.
    Yvonne

    Thanks for your help, Zupko.
    I tried your suggestion but I'm still experiencing the same
    problem. A new window still opens. Perhaps I'm doing something
    wrong?
    My code with your suggestion below:
    on (release){
    var my_lv:LoadVars = new LoadVars();
    my_lv.fullName = fullName_txt.text;
    my_lv.email = email_txt.text;
    my_lv.emailMessage = emailMessage_txt.text;
    if(fullName_txt.text != "" && email_txt.text != ""
    && emailMessage_txt.text != "") {
    loadVariables("contact.php","POST");
    gotoAndStop("success");
    else {
    gotoAndStop("error");
    Your help is very much appreciated!
    Yvonne

  • DW CS5, Sending contact form results to email with page redirection using php script

    I am currently building a site from scratch with Dreamweaver, with the intent of replacing my current website layout that was designed using Intuit's website builder. My dreamweaver site is not online, but i have setup a local test server on my computer, using XAMPP, and i have an apache server with a MySQL database and a mercury mailserver running. I mention that in case it makes a difference in your answers. If necessary, I can include those settings, but that may be asking too much.
    I have an html contact form for users to schedule service appointments. I need the resulting actioned php file to do the following after submit is clicked: verify certain fields have been entered; prevent spammers or verify human visitors; send the form results to a (hidden from public view of any kind) email address; redirect user to a confirmation page, or an error page.
    I found the following code but being less than a newbie im not sure what needs to be changed, or if its even the right script i should be using:
    5 <?php
    6 $email = $_POST['email'];
    7 $mailto = '[email protected]';
    8 $mailsubj = 'You Have a Service Request';
    9 $url = '/MyLandingPage.html';
    10 $req = '0';
    11 $mailbody = "Results from form:\r\n";
    12 $space = ' ';
    13 $line = '
    14 ';
    15 foreach ($_POST as $key => $value)
    16 {
    17 if ($req == '1')
    18 {
    19 if ($value == '')
    20 {echo "$key is empty";die;}
    21 }
    22 $j = strlen($key);
    23 if ($j >= 20)
    24 {echo "Name of form element $key cannot be longer than 20 characters";die;}
    25 $j = 20 - $j;
    26 for ($i = 1; $i <= $j; $i++)
    27 {$space .= ' ';}
    28 $value = str_replace('\r\n', "$line", $value);
    29 $conc = "{$key}:$space{$value}$line";
    30 $text .= $conc;
    31 $space = ' ';
    32 }
    33 mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
    34 echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
    35 ?>
    Can anyone please illuminate me on what I need?
    Thank You in advance

    Take a read here, this might enlighten you a little.
    http://www.paulgdesigns.com/learncontactform.php
    You are doing this with your local testing server, is it set up to email?
    Gary

  • How can I make my Contact Form send info to my email?

    Greetings! I have below a contact form that i have creaed with some help but I can't seem to make it send the information to my email address after it is submitted. That is my most important issue right now.
    A secondary issue is, can I make it so once this form is submitted it send the info to my email without doing a page redirect?
    Thanks in advance!

    Ok what about this code located at www.ybcreations.com/ContactTest.php?
    <?php
    // Set email variables
    $email_to = '[email protected]';
    $email_subject = 'BestMarketingNames Inquiry';
    // Set required fields
    $required_fields = array('fullname','email','comment');
    // set error messages
    $error_messages = array(
              'fullname' => 'Please enter a Name to proceed.',
              'email' => 'Please enter a valid Email Address to continue.',
              'comment' => 'Please enter your Message to continue.'
    // Set form status
    $form_complete = FALSE;
    // configure validation array
    $validation = array();
    // check form submittal
    if(!empty($_POST)) {
              // Sanitise POST array
              foreach($_POST as $key => $value) $_POST[$key] = remove_email_injection(trim($value));
              // Loop into required fields and make sure they match our needs
              foreach($required_fields as $field) {
                        // the field has been submitted?
                        if(!array_key_exists($field, $_POST)) array_push($validation, $field);
                        // check there is information in the field?
                        if($_POST[$field] == '') array_push($validation, $field);
                        // validate the email address supplied
                        if($field == 'email') if(!validate_email_address($_POST[$field])) array_push($validation, $field);
              // basic validation result
              if(count($validation) == 0) {
                        // Prepare our content string
                        $email_content = 'New Website Comment: ' . "\n\n";
                        // simple email content
                        foreach($_POST as $key => $value) {
                                  if($key != 'submit') $email_content .= $key . ': ' . $value . "\n";
                        // if validation passed ok then send the email
                        mail($email_to, $email_subject, $email_content);
                        // Update form switch
                        $form_complete = TRUE;
    function validate_email_address($email = FALSE) {
              return (preg_match('/^[^@\s]+@([-a-z0-9]+\.)+[a-z]{2,}$/i', $email))? TRUE : FALSE;
    function remove_email_injection($field = FALSE) {
       return (str_ireplace(array("\r", "\n", "%0a", "%0d", "Content-Type:", "bcc:","to:","cc:"), '', $field));
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <!-- Contact Form Designed by James Brand @ dreamweavertutorial.co.uk -->
    <!-- Covered under creative commons license - http://dreamweavertutorial.co.uk/permissions/contact-form-permissions.htm -->
              <title>Contact Form</title>
              <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
              <link href="Billy testing/ContactForm.css" rel="stylesheet" type="text/css" />
              <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.0/mootools-yui-compressed.js"></script>
        <script type="text/javascript" src="Billy testing/validation/validation.js"></script>
              <script type="text/javascript">
    var nameError = '<?php echo $error_messages['fullname']; ?>';
                        var emailError = '<?php echo $error_messages['email']; ?>';
                        var commentError = '<?php echo $error_messages['comment']; ?>';
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
        </script>
    </head>
    <body onload="MM_preloadImages('Billy testing/x.png')">
    <div id="formWrap">
    <h2>We appreciate your business</h2>
    <div id="form">
    <?php if($form_complete === FALSE): ?>
    <form action="ContactTest.php" method="post" id="comments_form">
              <div class="row">
              <div class="label">Your Name</div> <!--end .label -->
              <div class="input">
              <input type="text" id="fullname" class="detail" name="fullname" value="<?php echo isset($_POST['fullname'])? $_POST['fullname'] : ''; ?>"/><?php if(in_array('fullname', $validation)): ?><span class="error"><?php echo $error_messages['fullname']; ?></span><?php endif; ?>
              </div><!-- end. input --><!-- end .context -->
              </div><!-- end .row -->
        <div class="row">
              <div class="label">Your Email Address</div> <!--end .label -->
              <div class="input">
              <input type="text" id="email" class="detail" name="email" value="<?php echo isset($_POST['email'])? $_POST['email'] : ''; ?>"/><?php if(in_array('email', $validation)): ?><span class="error"><?php echo $error_messages['email']; ?></span><?php endif; ?>
              </div><!-- end. input --><!-- end .context -->
              </div><!-- end .row -->
        <div class="row">
              <div class="label">Comments</div> <!--end .label -->
              <div class="input">
              <textarea id="comment" name="comment" class="mess"><?php echo isset($_POST['comment'])? $_POST['comment'] : ''; ?></textarea><?php if(in_array('comment', $validation)): ?><span class="error"><?php echo $error_messages['comment']; ?></span><?php endif; ?>
              </div><!-- end. input -->
              </div><!-- end .row -->
        <div class="submit">
        <input type="submit" id="submit" name="submit" value="Send Message" />
        </div><!-- end .submit-->
        </form>
         <?php else: ?>
    <p style="font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#255E67; margin-left:25px;">Thank you for your Message!</p>
    <script type="text/javascript">
    setTimeout('ourRedirect()', 5000)
    funtion ourRedirect(){
              location.href='contact.html'
    </script>
    <?php endif; ?>
    </div><!-- end #form-->
    </div>
    <p> </p>
    <!-- end formwrap -->
    </body>
    </html>

  • How do I add a contact form / feedback form to my site?

    Is there a way to create forms in Muse? Or are there any widgets that can create forms?

    While there isn't yet native support for web forms in Muse (they're on our roadmap), there are some workarounds until we get there. Dani created a rough-cut video on how to add a contact form to your Muse site using Business Catalyst. Go to our Past Events list of Jam Sessions http://www.adobekb.com/events.html#past and watch the Adding Contact Forums session:
    Users have also reported success adding contact forms to their site using Adobe FormsCentral, Jotform, or Wufoo and inserting them via Object > Insert HTML.
    Message was edited by: Corey@Adobe
    (Removed broken AdobeTV link and added link to Jam session archives)

Maybe you are looking for

  • Remote URL is not working from html embedded as3 code

    Hello, i am working on a flash currency converter application, for that purpose i am fetching the latest currency rates from yahoo, i am using flash cs5 and as3, i am getting the desired response from yahoo when i run the flash file from Flash cs5 (c

  • Rubygems - May I gem update --system?

    I did like it was told in newsletter for April 3, 2008. But now I have: [root@silverhawk ~]# pacman -Qs rubygems local/rubygems 1.0.1-1     A package management framework for the Ruby programming language [root@silverhawk ~]# gem --version 1.1.0 Will

  • I Can't Organize My Favorites

    When I go under Favorites and then to Organize Favorites, all that comes up is a blank box. I can't organize my favorites.

  • Servlet- How to send the file as argument

    I am able to compile the below program. But when I open it in explorer I m not able to get the response. Its giving me the error. Actually the program requires the file from the user. I am giving that in the url in the folowing way http://localhost:8

  • Getting to a 'clean' finder from Startup Disk?

    I am having huge problems with new monitors holding a calibration. My tech at Lacie has recommended starting up from the startup disk with basically a 'clean' finder so we can determine if I am having a hardware or software issue that is causing the