This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('modules/DynamicFields/templates/Fields/TemplateText.php'); | |
class TemplateAutoincrement extends TemplateText{ | |
var $type = 'autoincrement'; | |
function get_field_def(){ | |
$def = parent::get_field_def(); | |
$def['studio'] = 'visible'; | |
$def['type'] = 'autoincrement'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); | |
function get_body(&$ss, $vardef){ | |
global $app_list_strings; | |
$vars = $ss->get_template_vars(); | |
$fields = $vars['module']->mbvardefs->vardefs['fields']; | |
$fieldOptions = array(); | |
foreach($fields as $id=>$def) { | |
$fieldOptions[$id] = $def['name']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{include file="modules/DynamicFields/templates/Fields/Forms/coreTop.tpl"} | |
<tr> | |
<td class='mbLBL'>Start index:</td> | |
<td> | |
<input id ="startindex" type="text" name="startindex" | |
{if !$vardef.startindex && !$vardef.startindex} | |
value="0" | |
{else} | |
value="{$vardef.startindex}" | |
{/if}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); | |
$mod_strings['fieldTypes']['autoincrement'] = 'AutoIncrement'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('include/SugarFields/Fields/Base/SugarFieldBase.php'); | |
class SugarFieldAutoincrement extends SugarFieldBase { | |
function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex, $searchView = false) { | |
$displayParams['bean_id']='id'; | |
$this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); | |
return $this->fetch($this->findTemplate('EditView')); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{if strlen({{sugarvar key='value' string=true}}) <= 0} | |
{assign var="value" value={{sugarvar key='default_value' string=true}} } | |
{else} | |
{assign var="value" value={{sugarvar key='value' string=true}} } | |
{/if} | |
<input type='text' name='{{if empty($displayParams.idName)}}{{sugarvar key='name'}}{{else}}{{$displayParams.idName}}{{/if}}' | |
id='{{if empty($displayParams.idName)}}{{sugarvar key='name'}}{{else}}{{$displayParams.idName}}{{/if}}' size='{{$displayParams.size|default:30}}' | |
{{if isset($displayParams.maxlength)}}maxlength='{{$displayParams.maxlength}}'{{elseif isset($vardef.len)}}maxlength='{{$vardef.len}}'{{/if}} | |
value='{$value}' title='{{$vardef.help}}' {{if !empty($tabindex)}} tabindex='{{$tabindex}}' {{/if}} | |
{{if !empty($displayParams.accesskey)}} accesskey='{{$displayParams.accesskey}}' {{/if}} {{$displayParams.field}}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sugarwiki | |
Adding a Field to the Modules Subpanels „ Popup Search “ definitions | |
Code way: | |
1. Use metadata/popupdefs.php (custom folder, if there is none copy original) | |
2. Seek section searchdefs' => array(…) | |
3. Add field to searchdefs | |
Or Studio way: | |
Admin > Studio > Contacts > Layouts > PopupView > Popup Search | |
Subpanel Query Change with custom fields |