<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Dear Joe,<br>
<br>
The provided method did not work. But I have found the right.<br>
<br>
Line: 464 in the file \Smarty\templates\EditViewUI.tpl was responsible
for the default checked state of all non-custom checkbox in the Product
Module Create View:<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input name="{$fldname}"
tabindex="{$vt_tab}" type="checkbox" {if ( $PROD_MODE eq 'create'
&amp;&amp;&nbsp; $fldname|substr:0:3 neq 'cf_') ||( $fldname|substr:0:3 neq
'cf_' &amp;&amp; $PRICE_BOOK_MODE eq 'create' ) || $USER_MODE eq
'create'}checked{/if}&gt;<br>
<br>
Cheers:<br>
<br>
<div class="moz-signature">Holbok Istv&aacute;n<br>
telefon: +3670-342-0900<br>
e-mail: <a href="mailto:holbok@gmail.com">holbok@gmail.com</a><br>
<b></b><br>
</div>
<br>
2010.06.29. 1:05 keltez&eacute;ssel, Joe Bordes &iacute;rta:
<blockquote cite="mid:4C292ABE.2090806@tsolucio.com" type="cite">
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
Hi,<br>
  <br>
Default values for the fields can be easily set in the EditView.php
script.<br>
Look for the next block of code:<br>
  <br>
if(empty($_REQUEST['record']) &amp;&amp; $focus-&gt;mode != 'edit'){<br>
&nbsp;&nbsp;&nbsp; setObjectValuesFromRequest($focus);<br>
}<br>
  <br>
  <br>
This is telling you that if we are creating then any value coming in
from the REQUEST will be set as the default value.<br>
Any value you want to set can be done here, like this:<br>
  <br>
if(empty($_REQUEST['record']) &amp;&amp; $focus-&gt;mode != 'edit'){<br>
&nbsp;&nbsp;&nbsp; setObjectValuesFromRequest($focus);<br>
&nbsp;&nbsp;&nbsp; $focus-&gt;column_values['your_field']=your_default_value;<br>
}<br>
  <br>
This is vtlib code, it is possible that Products doesn't have this, but
you can add it.<br>
  <br>
Give it a try and let us know how it turns out.<br>
Joe<br>
TSolucio<br>
  <br>
  <br>
El 29/06/10 00:57, Holbok Istv&aacute;n escribi&oacute;:
  <blockquote cite="mid:4C2928DD.3000007@gmail.com" type="cite">
    <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
Hi,<br>
    <br>
I need a small help.<br>
    <br>
My problem is: <br>
There is a checkbox type field "Product Active" in the product module
set default checked when creating a new product.<br>
    <br>
I have put some checkbox type fields into the Products module and all
of them inherited default checked. But I would like to use them default
unchecked.<br>
    <br>
I have reviewed all resources:<br>
Forum: <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://forums.vtiger.com/viewtopic.php?t=28553&amp;highlight=checkbox+default">http://forums.vtiger.com/viewtopic.php?t=28553&amp;highlight=checkbox+default</a>
(Joe Bordes solution)<br>
Smarty template files for the inventory<br>
EditView.php for the Products module<br>
    <br>
but I did not find the place where the checkbox set default checked.<br>
    <br>
It is the end of EditView.php file. Here is the only comment about it:<br>
    <big><b>// Added to set product active when creating a new product</b></big><br>
$mode=$focus-&gt;mode;<br>
if($mode != "edit" &amp;&amp; $_REQUEST['isDuplicate'] != "true")<br>
&nbsp;&nbsp;&nbsp; $smarty-&gt;assign("PROD_MODE", "create");<br>
    <br>
    <br>
if($focus-&gt;mode == 'edit') {<br>
&nbsp;&nbsp;&nbsp; $smarty-&gt;display('Inventory/InventoryEditView.tpl');<br>
} else {<br>
&nbsp;&nbsp;&nbsp; $smarty-&gt;display('Inventory/InventoryCreateView.tpl');<br>
}<br>
    <br>
But I did not see where it is set<br>
    <br>
Can some body help?<br>
    <br>
Cheers:<br>
    <br>
    <div class="moz-signature">Holbok Istv&aacute;n<br>
telefon: +3670-342-0900<br>
e-mail: <a moz-do-not-send="true" href="mailto:holbok@gmail.com">holbok@gmail.com</a><br>
    <br>
    </div>
    <pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Join vtiger community at <a moz-do-not-send="true"
 class="moz-txt-link-freetext" href="http://forums.vtiger.com">http://forums.vtiger.com</a></pre>
  </blockquote>
  <br>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Join vtiger community at <a class="moz-txt-link-freetext" href="http://forums.vtiger.com">http://forums.vtiger.com</a></pre>
</blockquote>
</body>
</html>