View Full Version : "save info" not working
Transcending
02-18-2006, 02:04 AM
Howdy all,
Unsure if anyone else has come across this one before, but unfortunately "save info" brings up a fair few results. If anyone can point me in the right direction, that'd be helpful.
My "save info" checkbox does not save the users info after they leave a comment.
Hopefully it's an easy fix.. Cheers.
Dkozikowski
02-18-2006, 07:33 AM
well, looking at your source code, i see:
<p><input type='checkbox' value='set' name='vcookie' /> Save User Info</p>
I do not see id="saveinfo" like bellow,
<p><input type='checkbox' value='set' name='vcookie' id="saveinfo" /></p>
This should resolve your problem. Just copy my code above and replace it with the code in your comment_template.html or just add id="saveinfo" to your line of code.
Transcending
02-18-2006, 10:10 AM
Thanks for that. Unfortunately it's still not working.
Tested with both FF and IE.
Dkozikowski
02-18-2006, 10:32 AM
I will check into it some more, but first, do you have cookies enabled? when you select the save info checkbox, it sets a cookie. if you have them disabled, they will not work.
Dkozikowski
02-18-2006, 10:55 AM
I think i see what is going on here.
The cookie is being save but not being entered into comment form.
look at your comment form code:
<form method='post' action='index.php?popup=comment&x=save_comment' name='commentform' >
<textarea name='message' rows='2' cols='10' class='input' style='width:360px;height:60px;'></textarea>
<input type='text' name='name' class='input' />
<input type='text' name='email' class='input' />
<input type='text' name='url' class='input' />
<input type='checkbox' value='set' name='vcookie' id="saveinfo" />
<input type='submit' value='Add' style="font-family: Verdana; font-size: 10px; text-decoration: none; font-weight: bold" />
<input type='hidden' name='parent_id' value='42' />
</form>
and look at the comment form code that comes with pixelpost:
<form method='post' action='index.php?x=save_comment' name='commentform' accept-charset='UTF-8'>
<textarea name='message' rows='2' cols='40' onfocus="clearBox(this);">
<input type='text' name='name' class='input' value='<VINFO_NAME>' id="name"/>
<input type='text' name='url' class='input' value='<VINFO_URL>' id="url"/>
<input class='input' type='text' name='email' value='<VINFO_EMAIL>' id="email"/>
<input name='vcookie' type='checkbox' id="saveinfo" value='set' checked="checked" />
<input type='submit' value='Add' class="comment-button"/>
<input type='hidden' name='parent_id' value='<IMAGE_ID>' />
<input type='hidden' name='parent_name' value='<IMAGE_NAME>' />
</form>
Now, look at the value attribute from the code above. You are missing these values from your form, <VINFO_NAME> , <VINFO_URL> , <VINFO_EMAIL> . These values are needed to input the information from the cookie.
Also, is there a reason your form is being submited to
index.php?popup=comment&x=save_comment
normally, you would use
index.php?x=save_comment
Transcending
02-19-2006, 03:07 AM
Cookies are definately on, as it's not happening with other sites and it's been replicated with two completely seperate browsers..
I've just added in the missing code from your previous post and am testing it now..
Edit: All fixed, thanks a heap :)
In regards to where it's being saved to, I'm not even sure what that code means.. and unless it's going to play a big problem, I'm not sure there's any point in editing - because it's working.
However, if it's an issue that you can see will be a problem later on, is a different story.
Dkozikowski
02-19-2006, 03:19 AM
Glad to hear its working now,
as far as the submission link, i suppose if it works then it should be alright to leave it. you can always test the other method by changing the code and making a test comment. you can always remove the test comment if it works.
Anyway - id="saveinfo" - it's only for how it looks in browser (CSS) :)
Dkozikowski
02-19-2006, 01:50 PM
I knew that too, wasn't sure what i was thinking! Must have been early in the morning ;)
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.