Contact Form - mx:ComboBox/ Submit data not label

Hello all,
     First off I am new to Flex and have searched far and wide for the past couple of hours now for an answer to this question. How would you send the data to an email address and not the label (But maintaining the label posted inside the form)? I found some great tutorials on creating a general form for example the one at RIA Codes and the one posted Trap17.com, both are great for a general form.
     But, lets say if you go along with the tutorial and want to add a combo box that selects the person you would like to email, without displaying the email address. Lets say we add-on a combobox to the RIA Codes tutorial, in order to select who the email will go to. This is what I have below and it works, just it keeps putting in the label in rather than the data (in Bold Below). Granted, I could just change the labelField="@label" to labelField="@data" but this would display the email address, which I do not want.
     Essentially I am trying to figure out a way to show the Persons Name and not the email in the contact form, but when you submit the form it would post the data (containing the email) and not the label (containing the Person's Name), so that the php would show something like this $sendToEmail = $_POST['recieverEmail']; and send the email. Thank you in advance for your help on this.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Style source="style.css"/>
<mx:Script>
   <![CDATA[
      import mx.events.ValidationResultEvent;
      import mx.controls.Alert;
      private function sendMail():void{
         var _senderName:String = senderName.text;
         var _senderEmail:String = senderEmail.text;
         var _recieverEmail:String = recieverEmail.text;
         var _emailMessage:String = emailMessage.text;
         var _emailSubject:String = emailSubject.text;
         var evValidMail:ValidationResultEvent = mailValidator.validate();
         var evValidContact:ValidationResultEvent = contactValidator.validate();
         var evValidName:ValidationResultEvent = nameValidator.validate();
         var evValidMessage : ValidationResultEvent = mailValidator.validate();
         if (evValidMail.type == ValidationResultEvent.VALID
         && evValidName.type == ValidationResultEvent.VALID
         && evValidContact.type == ValidationResultEvent.VALID
         && evValidMessage.type == ValidationResultEvent.VALID){
         emailService.send({senderName:_senderName, senderEmail:_senderEmail, recieverEmail:_recieverEmail, emailSubject:_emailSubject, emailMessage: _emailMessage});
         else{
            resultLabel.text="There are Form errors";
            resultLabel.setStyle("styleName", "invalid");
      private function emailResult():void{
            Alert.show("Thank you for contacting us");
            clearForm();
      private function clearForm():void{
         resultLabel.text="";
         recieverEmail.selectedIndex = 0;
         emailSubject.text="";
         emailMessage.text="";
]]>
</mx:Script>
   <mx:HTTPService id="emailService" url="mail.php" method="POST" resultFormat="xml" result="emailResult()" useProxy="false"/>
   <mx:EmailValidator id="mailValidator"
      source="{senderEmail}" property="text"
      requiredFieldError="Enter your email" required="true" />
   <mx:StringValidator id="contactValidator"
           source="{recieverEmail}" property="text"
           requiredFieldError="Select a contact" required="true" />
   <mx:StringValidator id="nameValidator"
      source="{senderName}" property="text"
      requiredFieldError="Enter your name" required="true"/>
   <mx:StringValidator id="emailValidator"
      source="{emailMessage}" property="text"
      requiredFieldError="Enter your message" required="true"/>
   <mx:Panel height="401" width="400" layout="absolute" title="Contact us">
      <mx:Form x="9" y="10" width="360">
         <mx:FormItem label="Name :">
            <mx:TextInput id="senderName" width="200"/>
         </mx:FormItem>
         <mx:FormItem label="Email :">
            <mx:TextInput id="senderEmail" width="200"/>
         </mx:FormItem>
         <mx:FormItem label="Contact :">
             <mx:ComboBox id="recieverEmail" width="200" selectedIndex="0" dataProvider="{contactXMLList}" labelField="@label" />
         </mx:FormItem>
         <mx:FormItem label="Subject :">
            <mx:TextInput id="emailSubject" width="200"/>
         </mx:FormItem>
         <mx:FormItem label="Message :">
            <mx:TextArea id="emailMessage" height="130" width="200"/>
         </mx:FormItem>
      </mx:Form>
       <mx:Button label="Submit" click="sendMail()" x="138" y="274"/>
      <mx:Label id="resultLabel" x="212" y="276"/>
   </mx:Panel>
   <mx:XMLList id="contactXMLList">
         <recieverEmail label="Person 1" data="[email protected]"/>
        <recieverEmail label="Person 2" data="[email protected]"/>
        <recieverEmail label="Person 3" data="[email protected]"/>
        <recieverEmail label="Person 4" data="[email protected]"/>
        <recieverEmail label="Person 5" data="[email protected]"/>
   </mx:XMLList>
</mx:Application>

Your labelField should be set to '@label' in order to to display the
name of the person in the ComboBox, but in your form submission method
you'll need to use the ComboBox's selectedItem property to extract the
email adress of the person that was selected.
So instead of the line:
*var _recieverEmail:String = recieverEmail.text;
*Have you tried:
var _recieverEmail:String = recieverEmail.selectedItem.@data;

Similar Messages

  • Contact form won't submit

    Hi everyone,
    I have the following code as my contact form but when I click the submit button, nothing happens, ie. it just stays on the same page and none of the data gets inserted into the CRM. I wondered if anyone can see any problems with the code below?
    Appreciate any advice.
    <form name="catwebformform22024" method="post" onsubmit="return checkWholeForm22024(this)" enctype="multipart/form-data" action="/FormProcessv2.aspx?WebFormID=70380&amp;OID={module_oid}&amp;OTYPE={module_otype} &amp;EID={module_eid}&amp;CID={module_cid}">
        <span class="req">*</span>  Required
        <table class="webform" cellspacing="0" cellpadding="2" border="0">
            <tbody>
                <tr>
                    <td><label for="Title">Title</label><br />
                    <select name="Title" id="Title" class="cat_dropdown_smaller">
                    <option value="913107">DR</option>
                    <option value="913106">MISS</option>
                    <option value="913103" selected="selected">MR</option>
                    <option value="913104">MRS</option>
                    <option value="913105">MS</option>
                    </select></td>
                </tr>
                <tr>
                    <td><label for="FirstName">First Name <span class="req">*</span></label><br />
                    <input type="text" name="FirstName" id="FirstName" class="cat_textbox" maxlength="255" /> </td>
                </tr>
                <tr>
                    <td><label for="LastName">Last Name <span class="req">*</span></label><br />
                    <input type="text" name="LastName" id="LastName" class="cat_textbox" maxlength="255" /> </td>
                </tr>
                <tr>
                    <td><label for="EmailAddress">Email Address <span class="req">*</span></label><br />
                    <input type="text" name="EmailAddress" id="EmailAddress" class="cat_textbox" maxlength="255" /> </td>
                </tr>
                <tr>
                    <td><label for="WorkPhone">Work Phone Number <span class="req">*</span></label><br />
                    <input type="text" name="WorkPhone" id="WorkPhone" class="cat_textbox" maxlength="255" /></td>
                </tr>
                <tr>
                    <td><label for="CellPhone">Mobile Phone Number</label><br />
                    <input type="text" name="CellPhone" id="CellPhone" class="cat_textbox" maxlength="255" /></td>
                </tr>
                <tr>
                    <td><label>Preferred Contact Method</label><br />
                    <input type="radio" name="CAT_Custom_328076" id="CAT_Custom_328076_0" value="Phone" />Phone<br />
                    <input type="radio" name="CAT_Custom_328076" id="CAT_Custom_328076_1" value="Email" />Email</td>
                </tr>
                <tr>
                    <td><label for="CAT_Custom_328077">Comments/Enquiries</label><br />
                    <textarea name="CAT_Custom_328077" id="CAT_Custom_328077" cols="10" rows="4" class="cat_listbox" onkeydown="if(this.value.length&gt;=4000)this.value=this.value.substring(0,3999);"></text area></td>
                </tr>
                <tr>
                    <td><input class="cat_button" type="submit" value="Submit" id="catwebformbutton" /></td>
                </tr>
            </tbody>
        </table>
        <script type="text/javascript" src="/CatalystScripts/ValidationFunctions.js"></script>
        <script type="text/javascript">
    //<![CDATA[
    var submitcount22024 = 0;function checkWholeForm22024(theForm){var why = "";if (theForm.FirstName) why += isEmpty(theForm.FirstName.value, "First Name"); if (theForm.LastName) why += isEmpty(theForm.LastName.value, "Last Name"); if (theForm.EmailAddress) why += checkEmail(theForm.EmailAddress.value); if (theForm.WorkPhone) why += isEmpty(theForm.WorkPhone.value, "Work Phone Number"); if(why != ""){alert(why);return false;}if(submitcount22024 == 0){submitcount22024++;theForm.submit();return false;}else{alert("Form submission is in progress.");return false;}}
    //]]>
    </script>
    </form>

    Hi there,
    Some basic questions to ask first. (Also it is easier if you post the link to the page rather then the code, we can see it ourselves, any errors, view the console etc)
    1. You are putting this form in a BC site?
    2. The webform in the admin with ID 70380 exists?

  • Why does my contact form on my Muse site not work?

    Hi,
    I have used Muse to design a website for a client without BC but the contact form doesn't work. I thought that Muse now has enabled this fueture for non BC users. I have ensured that the host has the PHP settings of 5.3 or higher and that Curl extentions and PHP sessions are enabled. However this was not originally the case and I was hoping that I had found the reason for this problem. What else do I have to do? I am not very good at coding. Your help would be very much appreciated.

    Thank you P_nath,
    I have followed the instruction on your document but I have still not solved this issue completely. The php check link shows that their is an isuue with the SQL configuration. The other two are green. When I change the receiving email address on my Muse contact form to my own yahoo email account it does come through properly, but when I put my clients email address it goes through as code (she uses Outlook Vista). I really want to sort this issue out without having to export this site as html because I am not good with coding. Does anyone know what is going on and how to make this form compatible with all email providers?
    The url to the site is
    http://www.sandmanrenovations.com.au/index.html

  • Forms don't submit data

    Acrobat 8 Professional on Mac OS X 10.4.11.
    A form I created in Acrobat does not transmit the data in the form fields when e-mailed vie the submit button. The artwork - created in Illustrator - arrives, but the fields are empty.
    This form is intended to be integrated into a web page via inline frame. It works properly but when I click on the submit button and the form opens in Mail, the fields are empty.
    It prints properly, from Acrobat as well as from Safari when integrated into a web page.

    Not initially. But I did after I read your reply. It didn't make a difference, though, and I would have been if it did since I have only Acrobat Professional installed and not the reader. So it's actually Acrobat what's running in the browser window.
    The data doesn't even show when I open the document in Acrobat and select "Attach to E-mail" from the File menu. It's only visible when I open and fill out the form in Acrobat or in the browser.
    Thanks for your reply.

  • Adobe Interactive Forms - Web Dynpro: itab data not in textfield layout

    Hi,
    out of a web dynpro application i'm generating a pdf document which is filled with data out of an internal table. This data is displayed with a name and following the itab value. But it looks like the value is displayed in a textfield. I want the value to be displayed like a standard text.
    How can I realitze this?
    Thanks in advance,
    Tan

    Hi Tan,
    What do you mean by standard text..?
    is that mean you want to display the content as a label (static text field..?) if so there are 2 approaches.
    1) drag and drop the field from data view onto form and change the visual properties of the field.
    2) Have a static text on the form right click in it, select floating field option in context menu, a field is generated do data binding for this field.
    if even my understanding of your requirement is wrong provide more info on the UI presentation you are looking for ..
    Regards,
    Sai Krishna.

  • Navigation from Contact Form

    Is there a way to not allow users to go
    back after they have entered data into a contact form and
    hit submit? On my site, once users input data into the "contact us"
    form and and hits send, they are sent to a "thank you" page. Is
    there a way to not allow the user to go from the "thank you" page
    back to the "contact us" page where all their data is
    waiting to be subitted again?
    Thanks - Matt

    The only way I can think of is to clear the browser history,
    but that's
    rather a nasty thing to do.
    Why do you not want them to go back?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "mtrueblood" <[email protected]> wrote in
    message
    news:gk0h61$ag2$[email protected]..
    > Is there a way to not allow users to go
    back after they have
    > entered
    > data into a contact form and hit submit? On my site,
    once users input data
    > into
    > the "contact us" form and and hits send, they are sent
    to a "thank you"
    > page.
    > Is there a way to not allow the user to go from the
    "thank you" page
    >
    back to the "contact us" page where all their data is
    waiting to be
    > subitted again?
    >
    > Thanks - Matt
    >

  • My Client is having a serious problem with the Contact Form Widget

    My Client is having a serious problem with the Contact Form Widget that I can not figure out how to correct.
    I created a website for a client and inserted a Contact Form widget on their 'Contact Us' page. Whenever anyone uses the form, the e-mail my client receive shows my e-mail address as the sender. So, when they 'reply' to the e-mail, the reply is sent to me and not the person who sent the original message. This creates a major problem in that I get barraged with e-mail replies while my client's potential customers go without a response.
    When I look at  'Site Manager > System E-Mails > Workflow Information > E-mail From Address' on the site's Admin Console, it shows my e-mail information. Is this is what needs to be changed?  If it is, what needs to be placed in that field so that the e-mail my client receives shows the senders e-mail information in the 'From' field.  My client wants to be able to click reply and have the message sent to the right party. They would be very upset if they have to cut and past the senders e-mail address from the body text on every contact they receive.
    Their feeling is that if I can't find a way to make the contact form work the way it should, then it's useless to them.
    Can anyone help me figure this out? I really don't want to disappoint my first client.

    Are you on a plan that has the CRM feature that stores your customers' data? If so, the idea of the contact form is that you'll receive a notification that there's been an inquiry filled out on your contact form and there should be a link in that email notification that leads to the "Case" that was created when that customer filled out a contact form.  You can click that link and visit the case for that customer in your BC site and reply to them from there so that all of the correspondence is logged in the CRM for safe-keeping and for your records.
    If your client finds this is too much work to login to BC to reply every time, then you should check to see if you have the "Customer Service Ticketing" feature on your hosting plan.  This is a feature where you create a dedicated email account (like [email protected]) and the BC system will automatically login to that email account and pull any emails in that inbox and convert them to a customer case for the sender of the email and then it will send out a notification via email to any of the BC Admin users you delegate as "Customer Service Agents".  Since the CST integrates with the BC CRM it lets you reply directly within the email-- but when you reply it will be going to that same email address dedicated to the CST but once the CST service checks your email again and sees that you replied to this inquiry it will log your reply against the customer's case and sends your reply via email back to them so that all the correspondance gets logged on BC's CRM but you can still reply via email.
    There's no way to use the default web forms to update the "From" or "Reply-To" address.. it must come from an approved email address to avoid spam issues.  On most web services you cannot change the "from" address anyway but usually you can at least specify the "Reply-To" address so that when someone hits "reply" in their email client it will reply to whoever you setup as the "Reply-To" address.
    Here's some more information about CST: http://kb.worldsecuresystems.com/kb/customer-service-ticketing.html?bc-partner
    I don't think the CST feature is in the webMarketing BC plan-- I think it's only in the webCommerce plan so if you have less than an webCommerce plan you have to tell your client to reply through BC by clicking the link in the notification they get.  You can justify it by saying its one or two more steps but it keeps the entire convo on record in their CRM for easy referral later.

  • My php contact form won't work. HELP!?

    I've been trying this for a while now, following a few different online tutorials. It seems like a simple concept but i just cannot get the contact form to relay any data. I'll paste my php coding and my form below. Any help would be much appreciated. Thanks.
    <div class="contact_form">
        <form id="contactform" action="contact.php" method="post">
      Name: <br><input name="name" type="text" id="name" value=""/>
        <br><br>
        Company Name: <br><input name="company_name" type="text" id="company_name" value=""/>
        <br><br>
        Telephone: <br><input name="telephone" type="tel" id="telephone" value=""/>
        <br><br>
        Email: <br><input name="email" type="email" id="email" value=""/>
        <br><br>
        Comments: <br><textarea name="comments" id="comments" value="" />  
        </textarea>
        <p></p>
        <input type="submit" name="submit" value="Send!"/>
    </form> 
    </div>
    <?php
    if (isset($_POST['name']) && isset ($_POST['company_name']) && isset ($_POST['telephone']) && isset ($_POST['email']) && isset ($_POST['coments']) ) {
      $name = $_POST['name'];
      $company_name = $_POST['company_name'];
      $telephone = $_POST['telephone'];
      $email = $_POST['email'];
      $comments = $_POST['comments'];
      if (!empty($name) && !empty($company_name) && !empty($telephone) && !empty($email) && !empty($comments) ) {
      $to = '[email protected]';
      $subject = 'Contact form submitted.';
      $body = $name. "\n" .$comments;
      $headers = 'From: ' .$email;
      if (@mail($to, $subject, $body, $headers)) {
      echo 'Thanks for contacting us. We\'ll be in touch soon!';
      } else {
      echo 'Sorry an error occurred. Please try again later.';
      } else {
      echo 'All fields are required.';
    ?>

    Try this:
    <!doctype html>
    <html>
    <?php
    if ($_POST){
    if (!filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL)){
    $message="Please provide a correct email address";} else {
      $name = strip_tags($_POST['name']);
      $company_name = strip_tags($_POST['company_name']);
      $telephone = strip_tags($_POST['telephone']);
      $email = $_POST['email'];
      $comments = strip_tags($_POST['comments']);
      $to = '[email protected]';
      $subject = 'Contact form submitted.';
      $body = $name. "\n" .$comments;
      $headers = 'From: ' .$email;
      if (mail($to, $subject, $body, $headers)) {
      echo 'Thanks for contacting us. We\'ll be in touch soon!';
      } else {
      $message = 'Sorry an error occurred. Please try again later.';
    ?>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    </head>
    <body>
    <?php echo "<p style='color:red'>$message</p>"; ?>
    <div class="contact_form">
        <form id="contactform" action="contact.php" method="post">
    <p>Name:<br/><input name="name" type="text" required /></p>
    <p>Company Name: <br/><input name="company_name" type="text" required/></p>
    <p>Telephone: <br/><input name="telephone" type="tel" required/></p>
    <p>Email: <br/><input name="email" type="email" required/></p>
    <p>Comments: <br/><textarea name="comments" required/>   </textarea></p>
        <input type="submit" name="submit" value="Send!"/>
    </form>
    </div>
    </body>
    </html>

  • HTML 5 Contact Form "Placeholder" instead of label makes form validation not work

    Hi,
    I am trying to implement a HTML 5 contact form which uses a "placeholder" within the field instead of a label. But now the form validation does not work.
    The site is at http://www.partnerrealestate.ch/avenuedefrance23/index.html and it is not using any workflows from BC as the person receiving it is an external person and the process does not require a workflow.
    Would appreciate any input into this.
    Kindest Regards,
    corina

    There is no label on input fields. The form does not work because you have edited the names. BC needs the ID and names to be as it is issue when you create the form so it knows what to use for the validation and what information to pass into the database.
    So where you have edited these, you need to restore those.
    You have some invalid html on some input's as well one has input="" inside of it when rendered so that is not right.
    It is not to do with placeholder use. So fix up your HTML errors, correct the name and ID changes and it will work fine.

  • Submit PDF form via email = Operation is not permited!

    Hi there,
    I just downloaded a trial version of Acrobat 9.0 to see if we can make a bunch of our forms more user friendly and possibly interacive.
    I have created a form, and now I'd like to enable the user to submit the entire form by email to one of our email accounts by clicking a Submit button.
    I followed the required steps religously and defined the "Submit a form" action, triggered by "Mouse Up" and included  the required mailto:[email protected] link.
    However, when I open the form in either Acrobat Pro 9 or Reader 9, the text on the button is not there and when I click on the button it either pulls up an email that looks the way it's supposed to, but the "email was not sent". If I try the same thing on my MAC, clicking on the button generates "Operation not permitted" message.
    Where did I go wrong?
    Any pointers would be greatly appreciated as this feature or ability is pretty much crucial to our decision to purchase the application.
    Many thanks.

    There are a few things to be careful about, particularly if others are to read your form on a variety of systems.
    1. Don't use spaces in the file name. A lot of browsers will choke on spaces, though most are starting to accept this non-standard habit resulting from Windows habits.
    2. Don't put a space between mailto: and your email. It will send a space in from of your e-mail address that may cause a problem with an e-mail client.
    3. Your submit button was not labelled, with an icon as you had it set or simply text "Submit."
    I modified the form to come to me and filled it out. The data was sent to me and I asked to open it, it could not find the file but allowed me to select the form file and it opened up just fine. You can also open the form in Acrobat and use the import data option. It sounds like this last little bit was the hangup for you. In the past I have been able to select the FDF file and it would open right up. I am not sure what is necessary for it to find the form - standard placement or what I am not sure.

  • Code issue in php form - submit button not sending email

    Created a form that was originally supposed to open up to 2 pages depending on what was clicked. Clear would send you to an error page, and submit would send you to a thank you page. Decided that was a waste and so did not create the html pages. BUT, wanted the form info for the contact page.
    Here is the issue: it will not submit when submit is clicked. It clears when you click clear, but there's no email coming from the site via submit.
    Do I need to edit the php form code if I don't want the other pages? I've looked at what I have but I don't see if there is a form error or anything here. Here is the code for anyone who wants to have a look. Thanks in advance.
    <?php
    // get posted data into local variables
    $EmailFrom = "EMAIL FROM WEP PAGE - CONTACT - ";
    $EmailTo = "[email protected]";
    $Subject = "EMAIL FROM jennylowhar.com - CONTACT -";
    $name = Trim(stripslashes($_POST['name']));
    $telephone = Trim(stripslashes($_POST['telephone']));
    $email = Trim(stripslashes($_POST['email']));
    $comments = Trim(stripslashes($_POST['comments']));
    // validation
    $validationOK=true;
    if (Trim($name)=="") $validationOK=false;
    if (Trim($email)=="") $validationOK=false;
    if (!$validationOK) {
      print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">";
      exit;
    // prepare email body text
    $Body = "";
    $Body .= "name: ";
    $Body .= $name;
    $Body .= "\n";
    $Body .= "telephone: ";
    $Body .= $telephone;
    $Body .= "\n";
    $Body .= "email: ";
    $Body .= $email;
    $Body .= "\n";
    $Body .= "comments: ";
    $Body .= $comments;
    $Body .= "\n";
    // send email
    $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
    // redirect to success page
    if ($success){
      print "<meta http-equiv=\"refresh\" content=\"0;URL=thankyou.html\">";
    else{
      print "<meta http-equiv=\"refresh\" content=\"0;URL=error.php\">";
    ?>

    I'm confused by that, but I know this works.
    $fname=STRIPSLASHES($_POST['fname']);
    $lname=STRIPSLASHES($_POST['lname']);
    $title=STRIPSLASHES($_POST['title']);
    $company=STRIPSLASHES($_POST['company']);
    $street=STRIPSLASHES($_POST['street']);
    $town=STRIPSLASHES($_POST['town']);
    $zip=STRIPSLASHES($_POST['zip']);
    $phone=STRIPSLASHES($_POST['phone']);
    $fax=STRIPSLASHES($_POST['fax']);
    $county=STRIPSLASHES($_POST['county']);
    $phone=STRIPSLASHES($_POST['phone']);
    $email=STRIPSLASHES($_POST['email']);
    $comments=STRIPSLASHES($_POST['comments']);
    $date=STRIPSLASHES($_POST['date']);
    $time=STRIPSLASHES($_POST['time']);
    $location=STRIPSLASHES($_POST['location']);
    $from="$email";
    $to="putemailhere";
    $subject="Submission from Contact Form";
    $msg= "This is a submission from yoururl.com.\n\n"
    . "Clients Name: $fname . $lname \n"
    . "Title: $title\n"
    . "Company Name: $company\n"
    . "Street Address: $street\n"
    . "Town:$town\n"
    . "Zip: $zip\n"
    . "Telephone: $phone\n"
    . "Email Address: $email\n"
    . "Comments: $comments\n";
    mail($to, $subject, $msg, 'From:' .$from);
    PS, go back and edit your origial post and REMOVE your email.
    Gary

  • My contact form is not working.

    Here is my html code for my contact form which is located in Contact.htm :
    <form method="POST" action="contact.php">
    <p>Name:<br>
    <input type="text" name="Name:">
    <p>Company:<br>
    <input type="text" name="Company:">
    <p>Phone:<br>
    <input type="text" name="Phone:">
    <p>Email:<br>
    <input type="text" name="Email:">
    <p>Comments:<br>
      <textarea name="Comments:" cols="45" rows="5"></textarea>
    <p><input type="submit" name="submit" value="Submit">
    </form>
    Here is my code which is located in my php file contact.php :
    <?php
    mb_http_input("UTF-8");
    mb_http_output("UTF-8");
    $EmailFrom = Trim(stripslashes($_POST['EmailFrom']));
    $EmailTo = "[email protected]";
    $Subject = "Web Contact Form";
    $Name: = Trim(stripslashes($_POST['Name:']));
    $Company: = Trim(stripslashes($_POST['Company:']));
    $Phone: = Trim(stripslashes($_POST['Phone:']));
    $Email: = Trim(stripslashes($_POST['Email:']));
    $Comments: = Trim(stripslashes($_POST['Comments:']));
    $validationOK=true;
    if (Trim($EmailFrom)=="") $validationOK=false;
    if (!$validationOK) {
      print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
      exit;
    $Body = "";
    $Body .= "Name:: ";
    $Body .= $Name:;
    $Body .= "\n";
    $Body .= "Company:: ";
    $Body .= $Company:;
    $Body .= "\n";
    $Body .= "Phone:: ";
    $Body .= $Phone:;
    $Body .= "\n";
    $Body .= "Email:: ";
    $Body .= $Email:;
    $Body .= "\n";
    $Body .= "Comments:: ";
    $Body .= $Comments:;
    $Body .= "\n";
    $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
    if ($success){
      print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.htm\">";
    else{
      print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
    ?>
    The error I get when I submit the information on the form is:
    Parse error: syntax error, unexpected ':' in D:\Hosting\5199406\html\contact.php on line 8
    Line 8 = $Name: = Trim(stripslashes($_POST['Name:']));
    I actually took this line out to see if it would work and then it gave me an error that Line 9 was not working...
    HELP PLEASE!

    Hello,
    Please try to read this tutorial hoping it may help
    Creating a Contact form in Dreamweaver from scratch
    In this tutorial we will build a contact form with Dreamweaver CS3 from scratch, our application consists of 2 pages, The first page contains the contact form, and the second page contains the form submission action and the thank you message. Also we will use Dreamweaver form validation behavior to validate the form. The Validate Form behavior checks the contents of specified text fields to ensure that the user has entered the correct type of data.
    Best Regards
    Waleed Barakat
    Developer-Online Creator and programmer

  • Contact form not including 'name' or 'message'

    The default short _Footer-Contact form is not confirming the message enter into the text area box, and not send the message either.
    See gswichita.businesscatalyst.com - send me a message from the contact form in footer and when you get confirmation, the message you sent will probably be missing.
    I changed the original default form to *Required field for the text area, and here is the HTML for that problem form area, but doubt that's were the problem is for the submit.
    <textarea name="CAT_Custom_389795" id="CAT_Custom_389795" cols="10" rows="4" onkeydown="if(this.value.length&gt;=4000)this.value=this.value.substring(0,3999);" placeholder="Message"></textarea>
    More footer form problems:
    1. after submitting message, use the back button to page where form was submitted; form data was not cleared, which could lead to duplicate submissions.
    2. email auto-responder appended the reply with "Course List" and some backend code at the bottom, but did NOT include the Name or the message that was submitted.
    Case Number
    1140008
    Your Name
    Message
    Course List
    {module_webapps,904,a,,,,true,-1,,1}
    {module_contentholder, name="_Template - Testimonials"} {module_contentholder, name="_Template - Events List"}
    Thanks,
    Heidi

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
    http://forums.mozillazine.org/viewforum.php?f=25 <br />
    You'll need to register and login to be able to post in that forum.

  • Using contact form created in DW with Business Catalyst (was: form submit)

    Hi.
    I hope some one can help. My son has built a contact form which he wants the contents to be sent to his email address when they submit it. His site is built using Dreamweaver and is hosted on BC, he has not used BC modules to build the site it was solely built in Dreamweaver CC and uploaded to BC. Can any one tell us what code we should be using for the form to be sent to his email as we are not sure what BC will accept.
    Thanks, James.

    jptphotography wrote:
    Hi Alex,I have found some php that hopefully will help it along, I will be trying it later.
    You need to find out if BC allows php processed forms to be hosted. Questions about form processing have come up before on the forum and I seem to remember that BC has its own way of processing forms, although I could  be wrong.
    If you need help with setting up a php script to process the form then there are plenty of people on the forum that could give you some guidance and assistance.

  • Acrobat 7 Pro - form won't submit via email, and data won't submit either

    Hi. I am trying to create a form for end users at my website to be able to open the form in Reader, enter their data in the form, and click on the "Submit" button to email it back to me (or any other way it can come back would be okay... as long as I can get the data).
    In doing some research on program software needed to do this, I came to the conclusion I needed to have the Adobe suite (Acrobat Pro 7, Distiller 7, and Designer 7), and so I spent a lot of money obtaining this software. I also have just downloaded Reader 9.0 (the most recent).
    Here are some particulars:
    1. Following directions Ive found on Adobe online, and the Help files as well as in this forum, in the form (in Designer), I have the Submit button going to a URL of mailto:[email protected].
    2. I've saved the form as a Static PDF Form File in Designer. Things are going well.
    3. The form works great in PDF Preview all form fields are setup and act correctly. Super!
    4. I FTP my file to the appropriate website, where once the link to the form is clicked the form opens (in Reader) for my users. Perfect!
    5. The user then opens the form, and before they start to fill it out, a popup shows this:
    Sending Data Fields By Email. Please note: This form contains an email submit button. Clicking this button will email a data file containing data you type into this form. However, the form itself will not be sent. Remember, you cannot save a completed copy of this form with Adobe Reader 9
    Then you have the option to Dont show again and a button to Close.
    6. After clicking Close, the user is then able to fill in the fields. These fields are standard fields, nothing exceptional, nothing fancy, just text.
    7. At the end of the form is the Submit button. When a user clicks this, NOTHING happens. Even when you try to do the File/Send thing, the form will send, but none of the data. Im not so happy right now L
    8. In this forum, I now see directions to Reader Enable in Adobe Pro (I do have Adobe Pro). The directions say Advanced/Enable Reader (as in one of the above posts is stated, 'Advanced > Enable Usage Rights in Adobe Reader'). However, I do not have an Enable Usage Rights in Adobe Reader under my Advanced tab. So, continuing to read in other similar posts, I find others dont have this option either so, one question is, where is it??? ;-)
    9. Now I see what appears to be another piece of Adobe software that I need, that is LiveCycle? I think Im getting in over my head, as I dont understand
    I am new to all this, and am doing my best, but now Im totally confused. All I want to do is have my measly little form open up and have people fill it in and email it back to me so that I can take that data and work with it.
    I run (or am trying to run) a non-profit (i.e., Im paying 100% of the bill) website for local Humane Societies who can facilitate offering online Adoption Applications (this is the form Im trying to make happen). I got the form made, and its fillable its just not being able to be submitted online; and when it DID get submitted (first try or so), it came through with no data, and the .xml file data wouldnt populate.
    Bottom line question: Is this, what Im trying to do, feasible or not? Im just a simple soul trying to help out some animals. Im not a programmer, so if thats what it takes I guess Im gonna have to give up and forget it. I only wanted to help make things easer for folks to adopt a pet.
    Any help by anyone would be totally and gratefully appreciated. Thank you.
    keywords: empty form, form not submitting, can't email form, data not transferring, no data in form, can't submit form, can't submit data

    Hi, and thank you for the reply.
    I've already spent several hundred dollars on getting Adobe Acrobat software, and was hoping there was some work-around on this? What did people do before LiveCycle for instance when they needed to get data from submitted forms via email?
    Please don't misunderstand, but as in my example described above, what can a 3rd party do for me (to enable more 'robust rights') that I can't do myself? I'm trying to figure out if I have the software to do it, paid for the software that is "supposed" to do it, why then I need to pay more money to someone else to make the software do what it's supposed to? I sure don't want to have to pay someone to fix it each time I need to make a change in my form for instance...
    I'm confused I guess - I suppose the purpose of my asking on the forum here was to hopefully gain some know-how as how to go about doing this myself vs. paying someone else to do it for me. I want to learn, but just don't know where to start. Or, maybe the software I have just doesn't do what I believed it was capable of doing?
    Guidance and/or suggestions from all on this point would be very appreciated. Thank you.

Maybe you are looking for