Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Why IS this working?

  • This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #30714

    I have a contact form that should be referencing/action contactengine.php but it is not. How is it working, I don’t understand?











    Got it here. https://css-tricks.com/examples/NiceSimpleContactForm/

    #74785
    benh359
    Participant

    How do you mean by working? If you mean that the thank you page is being displayed, then yes this is correct as that’s what you’ve specified as the action for the form – however, you’re not actually doing anything with the data you’ve submitted, it’s just being posted to that page.

    You need to post it to the contactengine.php script and then modify that script to then redirect to your thank you page.

    Hope that helps.

    Ben

    #74786

    I am wondering how this form is working when it is not referencing the contactengine.php form.

    You can view it in the sidebar here if you like.
    http://homerunlogo.com/logo/

    #74787
    jamygolden
    Member

    The form isn’t working. When a user clicks submit, he/she is taken to a thank you page, however, nothing else has happened.

    The action is run after submit is clicked, thus the users are taken to the thank you page after submit has been clicked.

    #74790

    It IS working. I just tested it. This is the content of the email I received.

    Name:left side
    Phone:3423453
    Email:;lkjl;kj

    It came from [email protected]

    Hosted with godaddy.

    #74791
    benh359
    Participant

    Weird – did you get the tests I did? Only thing I can think of is maybe WordPress tries to process things like that or maybe a plugin that does the same?

    #74792
    Bob
    Member

    So if it’s working, what is your question?

    Edit: this is weird, when I inspect it with Firebug the form action=”http://homerunlogo.com/thanks/”
    However, when looking at the source directly (CTRL+U) the form action=”http://homerunlogo.com/wp-content/themes/Homerum/contactengine.php”

    Why is that different?

    #74793
    jfreehill
    Member

    Did you by chance add the Thanks page as a custom page in the WordPress admin? I’m not positive on the inner workings of WordPress but it seems to me the server (WordPress) might be replacing the location of the php file with an existing page that uses that template page.

    It’s not Javascript because the form action sources stay the same even if it’s disabled and still exhibit the peculiar behavior Bob talks about. Chris’s offline demo doesn’t show this happening (with MAMP enabled) so it must be something one of your plugins is doing or WordPress is doing it for you to attempt to mask the PHP location. As long as your original code says the right thing then I wouldn’t worry about it.

    #74798

    Ok my real problem is that I actually have another contact form with the exact same code at the very top if you click “Attic”

    It sends me this in email…
    Name:Name:
    Phone:Phone:
    Email:Email:
    Notice it is putting the questions twice. It doesnt do that on the form in the sidebar.

    These emails are coming from [email protected] if that helps.
    Hosted with godaddy.

    #74796
    jfreehill
    Member

    Well if you’re just submitting either one without entering any text of course it will do that because the PHP script is already inserting “Name:, Phone:,” ect. which is the same default text you have in the boxes.

    Nice looking site by the way, although I noticed in Safari and Firefox the sliding element for the Attic form doesn’t come down far enough and cuts off half the submit button.

    #74651

    I am entering copy into the form, but it’s not reading it or something.

Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.