<%# Controls header %>
Ferti© Recipe
<%= form_with url: ferti_recipe_path, method: :get, local: true, class: "d-flex flex-wrap gap-2 align-items-center", id: "recipe-form" do %>
<% end %> <%= link_to "Back", root_path, class: "btn btn-sm btn-secondary" %>
<% @recipe.each do |component, kg| %> <% prod_name = commercial_name_for(component) %> <% end %> <% if @recipe.blank? %> <% end %>
Product Fertilizer Qty (kg) Per portion (kg)
<%= prod_name %> <%= component.name %> <%= fmt_kg(kg) %> <%= fmt_kg(kg / (params[:portions].presence || 2).to_f) %>
No supplementation required.
<%# Tiny vanilla JS: auto-submit on volume change; live per-portion update %>