Good afternoon all
I'm having a little issue with placing an if smarty statement to customCode in editviewdefs.php. The module in question is the bugs module and simply what I am trying to achieve is to disable the datetime type field.
Now I have set it all up and it disables, as I have also done this with enum fields and text fields. However the datetime calendar and icon is missing, when I impliment the code below:
1 =>
array (
'name' => 'due_by_date',
'label' => 'LBL_DUE_BY_DATE',
'customCode' => '{if (in_array($current_user->id, array(
\'9ada376e-123a-bf3c-cfe4-xxxxxxxxxx\',
\'9eb68071-648f-c10c-f024-xxxxxxxxxx\',
\'d5443539-6299-f140-26e5-xxxxxxxxxx\',
\'1a99e6ce-dead-918d-e8f0-xxxxxxxxxx\',
\'91842622-4ed9-26cc-d822-xxxxxxxxxx\',
\'17391e55-7ca9-f8d8-203e-xxxxxxxxxx\'
)
))}
<input name"due_by_date" type="datetime" value="{$fields.due_by_date.value}" >
{else} <input type="text" value="{$fields.due_by_date.value}" disabled="true">
{/if}',
),
),
If i use the field in a standard field setup everything is fine (see below).
1 =>
array (
'name' => 'due_by_date',
'label' => 'LBL_DUE_BY_DATE',
),
),
But when I try to use it in the smarty way it only displays a text field with the value. Please could someone point me in the direction of how to use a datetime field in a customCode {if} statement.
I'm using SugarCRM community and 5.2i, apache server and mysql database
Hope this is enough info, please let me know if you need more
Regards
John


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks