<% if form.present? %>
<%= form.label field.id, label %>
<% else %>
<%= field.name %>
<% end %>
<% if on_edit? && field.is_required? %> * <% end %>
<% if on_show? %>
<% if field.value.blank? and dash_if_blank %>
—
<% else %>
<%= content %>
<% end %>
<% elsif on_edit? %>
<%= content %>
<% if record.present? and record.errors.include? field.id %>
<%= record.errors.full_messages_for(field.id).to_sentence %>
<% end %>
<% if help.present? %>
<%== help %>
<% end %>
<% end %>
<% if params[:avo_debug].present? %>
<% end %>
<% end %>