Hi All
I wanna make that; After selecting an item from DropDown list a new box should open near it automaticly.
(If not selectied not open)
Is it possbile ?
Regards
Hi All
I wanna make that; After selecting an item from DropDown list a new box should open near it automaticly.
(If not selectied not open)
Is it possbile ?
Regards
Last edited by cagatay; 2008-03-27 at 02:27 PM.
Hi, cagatay
You could do that using javascript event onchange which modify the visibility of the field.
--
André Lopes
Lâmpada Global Services
Rua Bela Cintra, 299 conjunto. 51
São Paulo, SP 01415-000
tel1. 55 11 3237-3110
cel. 55 11 7636-5859
e-mail: info@lampadacrm.com.br
Dear andopes
I know that it is easy with JS, but how can I integrate JS with SugarCRM ?
With which file? In which field? Line? etc...
Has nobody try and do that?
Sincerelly
Hi, cagatay.
You will modify only the file custom/modules/YourModule/metadata/editviewdefs.php
If it does not exist so copy from modules/YourModule/metadata/editviewdefs.php
Inside the 'templateMeta' array insert a new entry:
It will include the new js to the current page.PHP Code:'include' => array(
array('file' => 'modules/YourModule/YourModule.js'),
),
You must add a new entry to dropdown field:
This will define the onchage event to this field.PHP Code:'displayParams'=>array('required'=>true, 'javascript'=>'onchange="functionToCall();"'),
You must define a custom code to the field whose visibility will be set by the dropdown.
That is all, folks.
--
André Lopes
Lâmpada Global Services
Rua Bela Cintra, 299 conjunto. 51
São Paulo, SP 01415-000
tel1. 55 11 3237-3110
cel. 55 11 7636-5859
e-mail: info@lampadacrm.com.br
Hi,Originally Posted by cagatay
I wrote a small guide that explains how to add custom javascript code.
You can find it here.
In my guide, I show how to link 2 dropdowns, but you could easily change it to work with text fields.
What do you think the cookie monster eats ?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks