Forums

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

Home Forums Back End [Solved] Regarding screencast #62 – Advanced form

  • This topic is empty.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #28499
    jenycz
    Member

    Hey Guys –

    I’ve worked with jquery and all that jazz many times and have some PHP experience. Anyways, I’m using Chris’s screencast #62 and associated files (jquery.jqtransform.js, jquery.validate.js, jquery.form.js, websitechange.js) and everything was going smoothly in creating my custom for.

    I’ve run into one problem – I can’t get the URL of page and Additional URL’s sections to delete and have the script still work!

    Code below, if you prefer the test url is http://www.kooziebelt.com/test/index.php

    Code:



    That’s the actual form where the fields are – notice the changeonmutliple in the middle, that’s fine there – I’ll be changing the name but it can stay.

    Code:
    // Building a whitelist array with keys which will send through the form, no others would be accepted later on
    $whitelist = array(‘token’,’req-name’,’req-email’,’req-phone’, ‘typeOfChange’,’message-subject’,’URL-main’,’addURLS’, ‘curText’, ‘newText’, ‘save-stuff’, ‘mult’);

    That’s where it’s brought into the array – I’ve tried just deleting ‘URL-main’ and ‘addURLS’ but then the script doesn’t work right…

    Code:
    // Lets check the URL whether it’s a real URL or not. if not, stop the script

    if(!filter_var($_POST[‘URL-main’],FILTER_VALIDATE_URL)) {
    writeLog(‘URL Validation’);
    die(‘Hack-Attempt detected. Please insert a valid URL’);
    }

    I think this is where it validates the URL, not sure if I need to delete that or not…

    Code:
    // PREPARE THE BODY OF THE MESSAGE

    $message = ‘‘;
    $message .= ‘Website Change Request‘;
    $message .= ‘

    ‘;
    $message .= “

    “;
    $message .= “

    “;
    $message .= “

    “;
    $message .= “

    “;
    $message .= “

    “;
    $message .= “

    “;
    $addURLS = $_POST[‘addURLS’];
    if (($addURLS) != ”) {
    $message .= “

    “;
    }
    $curText = htmlentities($_POST[‘curText’]);
    if (($curText) != ”) {
    $message .= “

    “;
    }
    $message .= “

    “;
    $message .= “

    Name: ” . strip_tags($_POST[‘req-name’]) . “
    Email: ” . strip_tags($_POST[‘req-email’]) . “
    Phone ” . strip_tags($_POST[‘req-phone’]) . “
    Preferred Contact: ” . strip_tags($_POST[‘typeOfChange’]) . “
    message-subject: ” . strip_tags($_POST[‘message-subject’]) . “
    URL To Change (main): ” . $_POST[‘URL-main’] . “
    URL To Change (additional): ” . strip_tags($addURLS) . “
    CURRENT Content: ” . $curText . “
    NEW Content: ” . htmlentities($_POST[‘newText’]) . “

    “;
    $message .= ““;

    And finally, that’s where the body of the email is formed – I can see where the URL-main and addURLS are and have tried removing them, but again the script fails (meaning the form submits but I never get the email)

    I’ll be screwing around with it and hopefully get it going but if you have run into this problem before and know what I need to do I would really appreciate the help!

    #72858
    jenycz
    Member

    I got it, disregard previous! By the way, the tiny bit of code I had to delete wasn’t in anything I posted… Always something much simpler than you think!

    #53402
    mwarren
    Member

    hey, I’m having problems with my jqtransform setup, were you able to get the plugin to work with jquery 1.5?

    #53404
    Doug
    Member

    What was it? I seem to be having the same problem….form submits, but no e-mail arrives…

    #53405
    mwarren
    Member

    for me, the styling only loads in IE, but not firefox 4 or chrome. All my file paths are correct, but firebug shows that no styling is taking placing

    #53407
    Doug
    Member

    And solved, these files require php5

    #53408
    Doug
    Member

    seems to be working fine for me in FF 3.6.16

    #53409
    Doug
    Member

    make sure you load the plug in’s after you load jquery and feel free to share your URL

    #53410
    mwarren
    Member

    link: http://www.splatterhat.com/contact

    I can only see the form styling in IE, but at work we use IE7 :(

    Just downloded IETester, and it seems that now my ajax is failing on most of my navs in IE8…grrr what gives?

    #53411
    Doug
    Member

    hmmm, not sure. It renders fine in FF, sent a test through, and the redirect to the /index.php page doesn’t seem to be working. I get a 404 error. Maybe upload the files and start fresh? Other folks who were commenting on the post seemed to also have some rendering issues? Now….if only I could hide the name and email fields yet still capture cookie info! :)

    #53488
    mwarren
    Member

    what version of firefox? for me firefox 4 isn’t rendering it at all

    #53391
    Doug
    Member

    seems to be working fine for me in FF 3.6.16 – may want to start a new thread on rendering css in the website change request form – because this thread is marked as “solved”

    #53392
    mwarren
    Member

    i have a thread about this problem, no one has responded yet :(

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