it is very important to replace the form name which is different for each template, in the above code it is "NewPost" for example in the sell auction page it is "Add_Item_Form"
If you can not do the editing just upload the new template or copy this part only from the new template or the demos.