wire/modules/Fieldtype/FieldtypeComments/comments.js
/**
 * Populate cookie values to comment form
 * 
 */
Populate cookie values to comment form
Populate cookie values to comment form
function CommentFormCookies() {
	var $form = jQuery('form.CommentForm');
	if(!$form.length) return;
	var cookieValue = CommentFormGetCookie('CommentForm');
	if(cookieValue.length < 1) return;
	var values = cookieValue.split('|');
	$form.find(".CommentFormCite input").val(values[0]);
	$form.find(".CommentFormEmail input").val(values[1]);
	$form.find(".CommentFormWebsite input").val(values[2]);
	$form.find(".CommentFormNotify :input[value='" + values[3] + "']").prop('checked', true);
}
function CommentFormCookies ( ) { var $form = jQuery ( 'form.CommentForm' ) ; if ( ! $form . length ) return ; var cookieValue = CommentFormGetCookie ( 'CommentForm' ) ; if ( cookieValue . length < 1 ) return ; var values = cookieValue . split ( '|' ) ; $form . find ( ".CommentFormCite input" ) . val ( values [ 0 ] ) ; $form . find ( ".CommentFormEmail input" ) . val ( values [ 1 ] ) ; $form . find ( ".CommentFormWebsite input" ) . val ( values [ 2 ] ) ; $form . find ( ".CommentFormNotify :input[value='" + values [ 3 ] + "']" ) . prop ( 'checked' , true ) ; }
Populate cookie values to comment form
Populate cookie values to comment form
// $form.find(".CommentFormNotify :input[value='" + values[3] + "']").attr('checked', 'checked'); // JQM