I didn't understand your last question, do I need to do something with the code you wrote?
(I did a test by putting the code here:
item-send-friend.php
..............................................
<!-- ITEM CONTACT FORM -->
<form target="_top" action="<?php echo osc_base_url(true) ; ?>" method="post" name="contact_form" id="contact_form" <?php if(osc_item_attachment()) { echo 'enctype="multipart/form-data"'; };?> class="fw-box" style="display:block;">
<input type="hidden" name="action" value="contact_post" />
<input type="hidden" name="page" value="item" />
<input type="hidden" name="id" value="<?php echo osc_item_id() ; ?>" />
but it didn't work)