Add Field in Address

Add Field in Address

March 19, 2013 PHP SugarCRM Uncategorized 0

1) make fields name area_c by studio in contacts and accounts and leads

2) change in /include/SugarFields/Fields/Address/EditView.tpl

add line one line after country

{{assign var="area" value=$displayParams.key|cat:'_address_area_c'}} 

after that add one TR :

<tr>


<td id="{{$area}}_label" width='{{$def.templateMeta.widths[$smarty.foreach.colIteration.index].label}}%' scope='row' >


{sugar_translate label='LBL_AREA' module='{{$module}}'}:

{if $fields.{{$area}}.required || {{if $area|lower|in_array:$displayParams.required}}true{{else}}false{{/if}}}

<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span>

{/if}

</td>

<td>

<input type="text" name="{{$area}}" id="{{$area}}" size="{{$displayParams.size|default:30}}" {{if !empty($vardef.len)}}maxlength='{{$vardef.len}}'{{/if}} value='{$fields.{{$area}}.value}' tabindex="{{$tabindex}}">

</td>

</tr>

add one line like,

address_postalcode.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}<br>

{$fields.{{$displayParams.key}}_address_area_c.value}|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}

{$fields.{{$displayParams.key}}_address_country.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}

</td>

_address_postalcode.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}<br>

{$fields.{{$displayParams.key}}_address_area_c.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}

<br>

{$fields.{{$displayParams.key}}_address_country.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}

</td>

<td>

<input type="text" name="{{$postalcode}}" id="{{$postalcode}}" size="{{$displayParams.size|default:30}}" {{if !empty($vardef.len)}}maxlength='{{$vardef.len}}'{{/if}} value='{$fields.{{$postalcode}}.value}' tabindex="{{$tabindex}}">

</td>

</tr>

<!--tr>

<tr>

<td id="{{$area}}_label" width='{{$def.templateMeta.widths[$smarty.foreach.colIteration.index].label}}%' class="dataLabel" >

{sugar_translate label='Area' module='{{$module}}'}:

{{if $area|lower|in_array:$displayParams.required}}

<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span>

{{/if}}

</td>

<td width='{{$def.templateMeta.widths[$smarty.foreach.colIteration.index].field}}%' class='tabEditViewDF' >

<input type="text" name="{{$area}}" id="{{$area}}" size="{{$displayParams.size|default:30}}" {{if !empty($vardef.len)}}maxlength='{{$vardef.len}}'{{/if}} value='{$fields.{{$area}}.value}' tabindex="{{$tabindex}}">

</td>

</tr-->

<tr>

<td id="{{$area}}_label" width='{{$def.templateMeta.widths[$smarty.foreach.colIteration.index].label}}%' scope='row' >

{sugar_translate label='Area' module='{{$module}}'}:

{if $fields.{{$area}}.required || {{if $area|lower|in_array:$displayParams.required}}true{{else}}false{{/if}}}

<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span>

{/if}

</td>

<td>

<input type="text" name="{{$area}}" id="{{$area}}" size="{{$displayParams.size|default:30}}" {{if !empty($vardef.len)}}maxlength='{{$vardef.len}}'{{/if}} value='{$fields.{{$area}}.value}' tabindex="{{$tabindex}}">

</td>

</tr>

<tr>

<td id="{{$country}}_label" width='{{$def.templateMeta.widths[$smarty.foreach.colIteration.index].label}}%' scope='row' >

 

Leave a Reply

Your email address will not be published. Required fields are marked *