I changed a few things around. For a start you had multiple elements with the same id which isn't allowed, ids have to be unique and if they're not jQuery will only see the first one. I put an ID on each group (you can move if you need) that is different from the control, and that id is used to show\hide the whole element. I also gave that element a data-control-id so that the element can specify which control should be enabled\disabled. In the js I hooked into the events to set the disabled attribute appropriately.
<form method="post">
<div class="form-group" id="DDLFGroup" data-control-id="DDLF">
@Html.LabelFor(model => model.prod_name, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.DropDownListFor(model => model.prod_name, new SelectList(@Model.productos, "Value", "Text", Model.prod_name), "-Please Select-", new { @class = "form-control", @id = "DDLF", @style = "min-width: 500px" })
@Html.ValidationMessageFor(model => model.prod_name, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group" id="EFGroup" data-control-id="EF" style="display:none;">
@Html.LabelFor(model => model.prod_name, htmlAttributes: new { @class = "control-label col-md-2"})
<div class="col-md-10">
@Html.EditorFor(model => model.prod_name, new { htmlAttributes = new { @class = "form-control", @id = "EF", @style = "min-width: 500px", disabled="disabled" } })
@Html.ValidationMessageFor(model => model.prod_name, "", new { @class = "text-danger" })
</div>
</div>
<button type="button" class="btn btn-primary" onclick="return toggler()">Toggle</button>
<input type="submit" value="Submit"/>
</form>
<script type="text/javascript">
function toggler() {
$("#DDLFGroup, #EFGroup").toggle("slow", function () {
var el = $(this);
var target = $("#" + el.data("control-id"));
if (el.is(":visible")){
target.attr("disabled", false);
}
else{
target.attr("disabled", true);
}
});
return false;
}
</script>