A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: dreamweaver question can anyone help?

  1. #1
    Member
    Join Date
    Aug 2000
    Posts
    87
    I have created a form in Dreamweaver which sends information to my email address, it all works perfectly well...BUT....I want to make some of the sections compulsary so that they have to fill them in otherwise the form won't send, and it will go to a page that says you need to fill in section 'blah blah' to send this form.

    How do I do this, is it in the perl(cgi-bin)enquiry.pl or in the html on the actual web page.

    If anyone knows the code to make this work I will be very grateful.

    Thanks

    H

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    591
    Yeah you probably need to use CGI and Perl
    I don't know of any easy cut and paste methods. I'm sure somebody out there has figured out how to do it with Java, but in either case it's something running on your server.
    The form is submitted to the CGI script which checks it for different criteria and either sends it back to you or forwards it to the proper address. It's a pretty common script and should be found in any CGI book. Not real simple for a beginner though. Might be faster just to pay somebody to do it for you.

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    252
    I wrote this to make it easier for me to just impliment form checking in every site i do, this goes between script tags on your page, and you need to change the dontCheck variable and the form name.

    dontcheck specifies the fields that you do not want the script to verify, and the form name is the document.Register part just change Register to the name of your form. Then change your button from a submit to a button, or use a hyperlink instead. Do an onclick="checkMe()" and there you go, the script uses the form.elements collection to step through all the fields in the form, if the field name does not exits in the dontCheck list it is skipped. When an empty field if found, it give a prompt and stops, when everything has been checked it just submits the form. Easy!

    var dontCheck = "Fax Address";

    function checkMe() {
    var send = false;
    var o = document.Register;
    for (i=0; i < o.elements.length; i++) {
    if (dontCheck.indexOf(o.elements(i).name) == -1) {
    if (o.elements(i).value == "") {
    alert(o.elements(i).name + " is required!");
    o.elements(i).focus();
    send = false;
    return false;
    }
    else {
    send = true;
    }
    }
    }
    if (send) {
    o.submit();
    }
    }

    there should be nice spacing in this but alas

  4. #4
    Originally posted by helen davies
    I want to make some of the sections compulsary so that they have to fill them in otherwise the form won't send
    something like
    <input type="text" name="required" value="">

    check out Matt's formmail script at http://www.worldwidemart.com - it is a very reliable formmail script and comes complete with FAQs and readme and stuff on how to place the "required" tag

  5. #5
    Senior Member
    Join Date
    Oct 2000
    Posts
    300
    there's a very simple solution on the mm exchange which uses js, but does not require you typing any.

    just download the "validate form" extension and you can set everything up within dw using the panels.

  6. #6
    Member
    Join Date
    Aug 2000
    Posts
    87

    mm exchange

    This simple solution on the mm exchange sounds great where is the mm exchange........can I have the address/url so I can try it

    Thanks

    H

  7. #7

    Re: mm exchange

    Originally posted by helen davies
    This simple solution on the mm exchange sounds great where is the mm exchange........can I have the address/url so I can try it

    Thanks

    H
    yeah agreed better idea!! - you should be able to access the extensions download directly from dreamweaver

    Commands > Get More commands (DW4)

    keep worldwidemart on your bookmarks though - it has some very good free scripts :-)

  8. #8
    Senior Member
    Join Date
    Oct 2000
    Posts
    300
    the mm site seems do be down right now ...

    but what steve proposed is the easiest way, or go to http://www.macromedia.com/flash and click on the exchange link. then you will be able to find the extension. if not, please post again and someone will give you the link.

  9. #9

    Re: mm exchange

    Originally posted by helen davies
    This simple solution on the mm exchange sounds great where is the mm exchange........can I have the address/url so I can try it

    Thanks

    H
    just recognised the name - is that Helen formerly at FWT??

  10. #10
    Member
    Join Date
    Aug 2000
    Posts
    87

    if I am the helen davies you know have a look at this

    If I am the one you think you know, take a look at the preloader on this web site and see if you recognise me????

    http://www20.brinkster.com/helendavies

    H

  11. #11

    Re: if I am the helen davies you know have a look at this

    Originally posted by helen davies
    If I am the one you think you know, take a look at the preloader on this web site and see if you recognise me????

    http://www20.brinkster.com/helendavies

    H
    nope its not you!! - the helen i knew and worked with also left FWT to go into web work - coincidence

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center