9 Replies Latest reply on Jul 13, 2008 10:51 AM by lanasanta

    Activate Submit Button

    lanasanta
      I created a form with a drop down menu. I put the submit button at the end of the table. How do I make it actually work? How do I link it to send to my email address once the user selects from my drop down menus and hits submit? Thanks for all of the help!
      Lana
        • 1. Re: Activate Submit Button
          Level 7
          What does your host's FAQ/support pages say about form to mail scripts?
          Does the hosting have a control panel or CPanel? If yes, log in and look in
          the scripts section to see if there is a preinstalled form to mail script.

          If nonethe above, what flavor of server side scripting can you use on that
          hosting?
          If you can use php, I can suggest phpformmail

          here's my stock cut 'n paste on what to set to what, and why

          1)go to http://http://developerkarma.com/projects -->phpformmail
          download it.

          extract the ZIP file.
          **More detailed instructions are in the docs folder.
          **These shortcut instructions are for version 1.07 of the phpformmail
          script.

          2) open formmail.php in dreamweaver
          Make the following changes (in code view, turn line numbers on)

          2a)
          line 4,
          define('CHECK_REFERER', true);
          change to:
          define('CHECK_REFERER', false);

          reason: too many people use a firewall or Norton security to restrict this.

          2b)
          Line 43
          $referers = array('www.example.com', 'example.com');
          change to the domain name of your web site.

          reason: this probably isn't needed since we just turned the referrer
          checking off. but change it anyway.

          2c)  *this is to hard-code the recipient address into the php
          file, where it is totally invisible *
          Line 46
          $recipient_array = array();
          change to:
          $recipient_array = array('me' => 'youremailaddr...@example.com');

          **of course, replace youremailaddress@example.com  with the email address
          you want to receive the form data. Also note the single quote marks.
          reason: this sets the email address the form results will be sent to.
          You can also make a list of possible recipient alias values- see the readme
          in the docs folder.

          2d) give the script a default "From" address to use.
          Go to line 41
          Change:
          define('FROM', null);
          to:
          define('FROM', 'Example Name <myaddress@example.com>');
          substituting your name and email address.

          3) now do a File-->Save As and save this file to within this Local Site
          folder. save it as anythingyouwant.php

          4) in dw's File Panel, find anythingyouwant.php and upload it to the remote
          site.

          5) Now open your form html file in dreamweaver,

          5a)click the mouse into the form area, and select the <form> tag on the
          lower left margin of the design window.
          In the Property Inspector, it should now show the properties of the <form>
          tag. In the Property Inspector, to the right of the ACTION line, click the
          folder icon and browse to and select the anythingyouwant.php file
          you've saved to within this site.

          5b) now click within the form area and go to dw menu-->Insert-->Form
          Objects-->Hidden Field
          This inserts a hidden form field.
          In the property inspector, change the NAME/ID of this field to: recipient
          And the VALUE of this field to: me
          the code should look like:
          <input name="recipient" type="hidden" id="recipient" value="me">
          This tells the script to use the "me" recipient_alias value as the email
          address to send the form to.

          5c: Do you have a form field to collect the user's email address?
          If yes, if this field is named exactly "email" then the script will use the
          user's email as the reply to in the outgoing email

          6) Save and upload the form page.

          Try the form from the website.



          --
          Alan
          Adobe Community Expert, dreamweaver

          http://www.adobe.com/communities/experts/



          • 2. Re: Activate Submit Button
            UteFanJason Level 2
            Hi Alan.

            I want to add an email form to my site too and do not yet know php. May I use this also please?

            Thanks.
            • 3. Re: Activate Submit Button
              lanasanta Level 1
              Ok. I followed the steps you provided (thanks!), uploaded to my site. When I hit submit, I get the error message below. Being I'm a newbie, I don't understand what this means. Thanks again in advance, I greatly appreciate this forum.

              The following errors were found:

              * Nothing was sent by a form. (No data was sent by POST or GET method.) There is nothing to process here.

              Please use the back button to correct these errors.
              • 4. Re: Activate Submit Button
                Level 7
                url address to the uploaded form page please.


                --
                Alan
                Adobe Community Expert, dreamweaver

                http://www.adobe.com/communities/experts/



                • 6. Re: Activate Submit Button
                  Level 7


                  > http://www.lanasantagata.com/weldi%20builder.html

                  what did you use to make that page???

                  this below:
                  </table>
                  </form>
                  <input name="recipient" type="hidden"
                  id="recipient" value="me" />

                  the recipient form field needs to be IN the form.

                  --
                  Alan
                  Adobe Community Expert, dreamweaver

                  http://www.adobe.com/communities/experts/



                  • 7. Re: Activate Submit Button
                    lanasanta Level 1
                    dreamweaver and the development karma download. I put the <input name="recipient" type="hidden" id="recipient" value="me" /> in my dreamweaver page script, not in the php. So I create another area called recipient in the form, like i did for name and email? Below is what I have for HTML code.

                    </tr>
                    </table>
                    </form>
                    <input name="recipient" type="hidden" id="recipient" value="me" />
                    </div>
                    </body>
                    </html>
                    • 8. Re: Activate Submit Button
                      Level 7


                      > dreamweaver and the development karma download.

                      whatever you are using, you are doing it wrong.....

                      #apDiv153 {

                      hundreds of absolutely positioned divs??


                      PUT the recipient field within the <form> </form> tags so it is IN the form.

                      I put the <input
                      > name="recipient" type="hidden" id="recipient" value="me" /> in my dreamweaver
                      > page script, not in the php. So I create another area called recipient in the
                      > form, like i did for name and email? Below is what I have for HTML code.
                      >
                      > </tr>
                      > </table>
                      > </form>
                      > <input name="recipient" type="hidden" id="recipient" value="me" />
                      > </div>
                      > </body>
                      > </html>
                      >
                      >

                      --
                      Alan
                      Adobe Community Expert, dreamweaver

                      http://www.adobe.com/communities/experts/



                      • 9. Re: Activate Submit Button
                        lanasanta Level 1
                        Alan,

                        I know I'm doing it wrong, the reason I am here in this forum to begin with. Thanks for your efforts. I spend $3,000 on Adobe software and it does not come with an instruction manual. I'm doing the best I can. Why do I have hundreds of absolutely positioned divs? I have no freakin idea. Like I said, I'm a newbie and looking for some help. Please don't take this response as a negative expression of your efforts, I greatly appreciate it- I'm just getting frustrated, because I have no idea what you mean when you speak in codes, I'm trying to learn, believe me.