Announcement

Collapse
No announcement yet.

extra forms...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    extra forms...

    hi everone,

    my client wants to have two forms in addition to the contact us form and not knowing how to do this through actinic i just used some quick code of my own:

    built into a brochure page fragment:
    Code:
    <form action="formmail.php" method="post">
    
    <input type="hidden" name="whoto" value="test@client.com" />
    <input type="hidden" name="subject" value="Customer Feedback" />
    
    <table border="0" padding="10" margin="0">
      <tr>
        <td>Name:</td>
        <td><input name="name" type="text" size="20" maxlength="20" style="border: 1px solid #ccc;" /></td>
      </tr>
      <tr>
        <td>Email:</td>
        <td><input name="email" type="text" size="20" maxlength="20" style="border: 1px solid #ccc;" /></td>
      </tr>
      <tr>
        <td>Comments:</td>
        <td><textarea name="message" rows=5 cols=50 style="border: 1px solid #ccc;"></textarea></td>
      </tr>
    </table>
    
    <input type="submit" value="Submit" />
    <input type="reset" value="Clear" />
    
    </form>
    and

    formmail.php
    Code:
    <?php
    @extract($_POST);
    $name = stripslashes($name);
    $email = stripslashes($email);
    $message = stripslashes($message);
    mail($whoto,$subject,$message,"From: $name <$email>");
    header("location:Feedback.html");
    ?>
    but when the user clicks send... it just goes to a messed up version of the home page (and says ***/formmail.php in the address bar, should the "header" function have redirected?

    all in all, not used to stuff like this i'd really appreciate some help...

    #2
    Don't know if it will help, but there is a how to in the v8 advanced user guide on modifying the contact us form and changing the scripts to allow new fields in to it...

    Comment


      #3
      You may have inadvertantly nested forms (which isn't allowed). Look at the source of your generated page for <form ...> and </form> tags and check.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        I know it's been almost a year but i wonder did the OP ever fix this?

        I'm attempting something similar now. My client needs 2 mail forms on their website, a generic contact us for which i've customised Actinic's Contact Us and a separate mail form for submitting complaints

        Comment


          #5
          For anyone who's interested the code above works a treat. I just had to customise it too suit the fields i wanted in my form

          Comment

          Working...
          X