Is it possible to reload another select input based on the value previously selected in another input?
EX:
Category and Sub-Category.
Both return a key/value list to choose in a select input.
<div class="form-group">
<%= label f, gettext("Category"), class: "control-label" %>
<%= select f, :data_type, App.choose_category(), value: App.from_map(f,:data,"category"), name: "template[data][category]", class: "form-control" %>
<%= error_tag f, :data_category %>
</div>
<div class="form-group">
<%= label f, gettext("Sub Category"), class: "control-label" %>
<%= select f, :data_objective, App.choose_sub_category(SELECTED_CATEGORY), value: App.from_map(f,:data,"subcategory"), name: "template[data][subcategory]", class: "form-control" %>
<%= error_tag f, :data_subcategory %>
</div>