Hello,
my custom module file editviewdefs.php file is like this
<?php
$viewdefs ['Project'] =
array (
'EditView' =>
array (
'templateMeta' =>
array (
'maxColumns' => '2',
'widths' =>
array (
0 =>
array (
'label' => '10',
'field' => '30',
),
1 =>
array (
'label' => '10',
'field' => '30',
),
),
'form' =>
array (
'hidden' => '<input type="hidden" name="is_template" value="{$is_template}" />',
),
'includes' =>
array (
0 =>
array (
'file' => 'custom/modules/Project/projfile.js',
),
),
),
'panels' =>
array (
'default' =>
array (
0 =>
array (
0 =>
array (
'name' => 'name',
'label' => 'LBL_NAME',
),
1 =>
array (
'name' => 'status',
'label' => 'LBL_STATUS',
),
),
1 =>
array (
0 =>
array (
'name' => 'estimated_start_date',
'label' => 'LBL_DATE_START',
),
1 =>
array (
'name' => 'estimated_end_date',
'label' => 'LBL_DATE_END',
),
),
2 =>
array (
0 =>
array (
'name' => 'customer_reference_c',
'label' => 'LBL_CUSTOMER_REFERENCE',
),
1 =>
array (
'name' => 'opportunityname_c',
'label' => 'LBL_OPPORTUNITYNAME',
),
),
3 =>
array (
0 =>
array (
'name' => 'assigned_user_name',
'label' => 'LBL_ASSIGNED_USER_NAME',
'customCode' => 'sdfsdfsfsfssf',
),
1 =>
array (
'name' => 'quotenumber_c',
'label' => 'LBL_QUOTENUMBER',
),
),
4 =>
array (
0 =>
array (
'name' => 'priority',
'label' => 'LBL_PRIORITY',
),
1 =>
array (
'name' => 'shippingaccount_c',
'label' => 'LBL_SHIPPINGACCOUNT',
),
),
5 =>
array (
0 => NULL,
1 =>
array (
'name' => 'billingaccount_c',
'label' => 'LBL_BILLINGACCOUNT',
),
),
6 =>
array (
0 => NULL,
1 =>
array (
'name' => 'webstore_c',
'label' => 'LBL_WEBSTORE',
),
),
7 =>
array (
0 => NULL,
1 =>
array (
'name' => 'suppliername_c',
'label' => 'LBL_SUPPLIERNAME',
'customCode' => '<input type="hidden" name="supplierid_c" id="supplierid_c" value=""><input type="text" tabindex="1" title="" value="{$fields.suppliername_c.value}" maxlength="255" size="30" id="suppliername_c" name="suppliername_c"> <input title="select" type="button" class="button" value="Select" name="btn1" onclick="open_proj_popup();">',
),
),
8 =>
array (
0 =>
array (
'name' => 'description',
'displayParams' =>
array (
'rows' => '8',
'cols' => '60',
),
'label' => 'LBL_DESCRIPTION',
),
1 =>
array (
'name' => 'notes_c',
'label' => 'LBL_NOTES',
),
),
),
),
),
);
?>
in this I am calling a function open_proj_popup() which is included in the file 'custom/modules/Project/projfile.js' and the code for this is
function open_proj_popup(){open_popup("Accounts",600,400,"" ,true,false,{"call_back_function":"set_return","fo rm_name":"EditView","field_to_name_array":{"id":"s upplierid_c","name":"suppliername_c"}},"single",fa lse);}
in this i am opening popup on clicking the select button and returing the value to the parent form but the problem is the value is returing to the parent form with spaces are replaced with %20 and other characters with other symobls like "%20Mooirivier%20Congreshotel" please help me in this situation


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks