HI,
How to develop dependent drop down . I stuck in back-bone js that how i can get value of drop down.
and according to that i want populate another drop down.
Thank you
HI,
How to develop dependent drop down . I stuck in back-bone js that how i can get value of drop down.
and according to that i want populate another drop down.
Thank you
Hi Shiv Gawande
This post may help you.
If you want to do it from js file then do to so;
create-actions.js file
under initialize: function()
After this._super("initialize", [options]);
this.events['change input[name=your-fieldname]'] = 'getOptValue';
Then under getOptValue function :
getOptValue: function (elem) { var firstDropValue = this.model.get('firstDropFieldName'); $.ajax({ type: "POST", data: {firstdpvalue: firstDropValue}, url: 'get_secondDrop_list.php', // In this file get the value of first dropdown based on that get second dropdown values and return data in json dataType: 'json', success: function(json) { var $el = $("#SecondDropFieldID"); $el.empty(); $el.append($("<option></option>").attr("value", '').text('Please Select')); $.each(json, function(value, key) { $el.append($("<option></option>").attr("value", value).text(key)); }); } }); }
Hope this Helps
Best Regards
S Ramana Raju
Your post is working great..
If i have option of putting Correct Answer.. i would have given you.
Thanks
Sam
Hi Sam
Glad that it worked for you.
Best Regards
S Ramana Raju
i have try for status field in case module . but not working..
var $el = $('input[name=status]');
$el.empty();
$el.append($("<option></option>").attr("value", 'AC').text('Please Select'));
what i have did wrong. ?
this work on CE ? And where I can create my Js file
I Soo newbie on this! but I have not choice.
Jesus, no above is regarding Version 7. The principals of what is doing could work in jQuery.
Thanks Michael!, well
Hi jesus!
We are holding a webinar for Sugar CE users and I thought that you might be interested. During the webinar, we’re going to discuss SugarCRM peculiarities, the risks associated with its usage and the ways to mitigate those risks, and also the secrets of choosing the right CRM for your company. The webinar is based on many years of our practical experience in SugarCRM development and support. I hope to see you among our attendees!