0

I'm stuck! I need an additional variable in Wordpress comments. I have already made a field for it, let's call it "hometown".

            <p><input type="text" name="hometown" id="hometown" size="22" />
<label for="url"><small>Whats your hometown?</small></label></p>

This value needs to be stored and echo'ed when needed in comments loop. Is there any way to do this?

If it's not possible, a simpler method that appends #hometown value to the comment textbox's itself could do. The script I tried for appending text also doesn't work :

$("input").keyup(function () {
    var txt = document.querySelector("#hometown").value; 
    document.querySelector("#comment").value+= txt;
});

Please help me asap! Thanks.

4

1 回答 1

0

You could check this out, it might be the thing you want. click here

于 2013-04-26T10:46:24.553 回答