if i am not wrong i need to create a new form in entry.php and to update global.js accordingly rite?? i found some one did something like this with whats new form. here is the code below.
/* MINI-POST */
/* New posts */
jq(“input#mini-aw-whats-new-submit”).click( function() {
var button = jq(this);
var form = button.parent().parent().parent().parent();
form.children().each( function() {
if ( jq.nodeName(this, “textarea”) || jq.nodeName(this, “input”) )
jq(this).attr( ‘disabled’, ‘disabled’ );
});
jq( ‘form#’ + form.attr(‘id’) + ‘ span.ajax-loader’ ).show();
/* Remove any errors */
jq(‘div.error’).remove();
button.attr(‘disabled’,’disabled’);
/* Default POST values */
var object = ”;
var item_id = jq(“#mini-whats-new-post-in”).val();
var content = jq(“textarea#mini-whats-new”).val();
/* Set object for non-profile posts */
if ( item_id > 0 ) {
object = jq(“#mini-whats-new-post-object”).val();
}
jq.post( ajaxurl, {
action: ‘post_update’,
‘cookie’: encodeURIComponent(document.cookie),
‘_wpnonce_post_update’: jq(“input#_wpnonce_post_update”).val(),
‘content’: content,
‘object’: object,
‘item_id’: item_id
},
function(response)
{
jq( ‘form#’ + form.attr(‘id’) + ‘ span.ajax-loader’ ).hide();
form.children().each( function() {
if ( jq.nodeName(this, “textarea”) || jq.nodeName(this, “input”) )
jq(this).attr( ‘disabled’, ” );
});
/* Check for errors and append if found. */
if ( response[0] + response[1] == ‘-1? ) {
form.prepend( response.substr( 2, response.length ) );
jq( ‘form#’ + form.attr(‘id’) + ‘ div.error’).hide().fadeIn( 200 );
button.attr(“disabled”, ”);
} else {
if ( 0 == jq(“ul.activity-list”).length ) {
jq(“div.error”).slideUp(100).remove();
jq(“div#message”).slideUp(100).remove();
jq(“div.activity”).append( ” );
}
jq(“ul.activity-list”).prepend(response);
jq(“ul.activity-list li:first”).addClass(‘new-update’);
jq(“li.new-update”).hide().slideDown( 300 );
jq(“li.new-update”).removeClass( ‘new-update’ );
jq(“textarea#mini-whats-new”).val(”);
/* Re-enable the submit button after 8 seconds. */
setTimeout( function() { button.attr(“disabled”, ”); }, 8000 );
}
});
return false;
});
/* MINI-POST */
and the form for the new “mini-post-form”
———————–
<form action=”” method=”post” id=”mini-whats-new-form” name=”mini-whats-new-form”>
<input type=”submit” name=”mini-aw-whats-new-submit” id=”mini-aw-whats-new-submit” value=”” />
<form action=”” method=”post” id=”mini-whats-new-form” name=”mini-whats-new-form”>
<input type=”submit” name=”mini-aw-whats-new-submit” id=”mini-aw-whats-new-submit” value=”” />
Can anyone please guide me accordingly to get what i am trying to.