Viewing 6 replies - 1 through 6 (of 6 total)
  • I think the hack author may be the best person.
    Part of the reason I stopped doing polls was their lack of validation, though that was a few years ago 🙂

    Simple fix. The output for the poll creation needs to self-terminate the [input] blocks. that is,

    <input type="radio" name="poll-6" class="poll" value="34">

    should be

    <input type="radio" name="poll-6" class="poll" value="34" />

    The extra slash before the ending is required. I add a space for readability, though it may not be required.
    -d
    CHAITGEAR

    You want a closing / before the terminating > for the inputs — there are a number of them in the form, all need the forward slash.
    If you can’t quickly figure it out, I can post a modded polls.php later.
    -d

    Okay, I modded a copy (a bunch), and put it up at:
    http://www.chait.net/downloads/polls.phps
    Try that out — I think I’ve fixed all the validation issues, and made the output HTML a bit more readable while I was at it. 😉
    -d

    Thread Starter shadow

    (@shadow)

    Excellent David,
    Thanks very much – first time I have seen a true validation since installing the poll.
    I am not sure what you did but whatever it was – it’s great 🙂
    Thanks again…

    Aside from all the cleanup of the quoting strings, and adding more newlines…
    I just added a “/” before the closing “>” of each “<input” block. Rewriting the quoted strings made it a bit easier to see (a bit, not much) the ends. There were at least three (but I think it was five or so total, did an img tag too).
    -d
    CHAITGEAR

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Validating a plugin’ is closed to new replies.