Hi there
I have a dropdown in leads. and a field called referred by. I need the referred by field greyd out or hidden untill that dropdown value is chosen?
Any ideas?
Hi there
I have a dropdown in leads. and a field called referred by. I need the referred by field greyd out or hidden untill that dropdown value is chosen?
Any ideas?
You can do it with javascript
In editviewdefs you can add a onchange event to the dropdown
You also need to call this function when you edit the record so the field is set to the correct stateCode:1 => array ( 'name' => 'otype', 'label' => 'LBL_OTYPE', 'displayParams' => array ( 'javascript' => 'onchange="other_type(this.value)"', ), 'tabindex' => '11', ), ),
Mike Solomon
Development Manager
Ivy Ltd
www.ivy.ltd.uk]www.ivy.ltd.uk
php version 5.2.6
MySql 5.1.59
Thanks a lot.
Sorry but i am now a programmer so bare with me please.
This is still sugar 4.5.1
my dropdown field is type. and field that needs to be hidden is reffered_by
1 =>
array (
'name' => 'reffered_by',
'label' => 'LBL_reffered_by',
'displayParams' =>
array (
'javascript' => 'onchange="type(referred)"',
),
'tabindex' => '11',
),
),
Does the above too right?
1 =>
array (
'name' => 'otype',
'label' => 'LBL_OTYPE',
'displayParams' =>
array (
'javascript' => 'onchange="other_type(this.value)"',
),
'tabindex' => '11',
),
),
You need the javascript on the type field not the reffered_by field
The code I am using is in 5.2 - not sure if it will work in 4.5
I would test it by doing something like
array (
'name' => 'type',
'label' => 'LBL_TYPE',
'displayParams' =>
array (
'javascript' => 'onchange="alert(this.value)"',
),
'tabindex' => '11',
),
Then do a repair and try changing values in the dropdown - each time you change the value it should popup the field value
Mike Solomon
Development Manager
Ivy Ltd
www.ivy.ltd.uk]www.ivy.ltd.uk
php version 5.2.6
MySql 5.1.59
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks