diff --git a/ckanext/charts/templates/charts/snippets/charts_form_field.html b/ckanext/charts/templates/charts/snippets/charts_form_field.html
new file mode 100644
index 0000000..f0bf78c
--- /dev/null
+++ b/ckanext/charts/templates/charts/snippets/charts_form_field.html
@@ -0,0 +1,14 @@
+{#- master snippet for all charts form fields -#}
+
+{%- set form_snippet = field.form_snippet|default('repeating_subfields.html' if field.repeating_subfields else 'text.html') -%}
+
+{%- if '/' not in form_snippet -%}
+ {%- set form_snippet = 'scheming/form_snippets/' + form_snippet -%}
+{%- endif -%}
+
+{%- snippet form_snippet,
+ field=field,
+ data=data,
+ errors=errors,
+ resource_id=resource_id
+-%}
diff --git a/ckanext/charts/templates/charts/snippets/charts_form_fields.html b/ckanext/charts/templates/charts/snippets/charts_form_fields.html
index 93a4e71..b80ea66 100644
--- a/ckanext/charts/templates/charts/snippets/charts_form_fields.html
+++ b/ckanext/charts/templates/charts/snippets/charts_form_fields.html
@@ -40,8 +40,12 @@
{% if tab_fields %}
- {% snippet 'charts/snippets/render_fields.html', fields=builder.get_fields_by_tab(tab), data=data,
- errors=errors %}
+ {% snippet 'charts/snippets/render_fields.html',
+ fields=builder.get_fields_by_tab(tab),
+ data=data,
+ errors=errors,
+ resource_id=resource_id
+ %}
{% endif %}
{% endfor %}
diff --git a/ckanext/charts/templates/charts/snippets/render_fields.html b/ckanext/charts/templates/charts/snippets/render_fields.html
index 75d21c9..ac4cfb8 100644
--- a/ckanext/charts/templates/charts/snippets/render_fields.html
+++ b/ckanext/charts/templates/charts/snippets/render_fields.html
@@ -1,3 +1,3 @@
{% for field in fields if field.form_snippet is not none %}
- {% snippet 'scheming/snippets/form_field.html', field=field, data=data, errors=errors %}
+ {% snippet 'charts/snippets/charts_form_field.html', field=field, data=data, errors=errors, resource_id=resource_id %}
{% endfor %}
diff --git a/ckanext/charts/templates/scheming/form_snippets/chart_filter.html b/ckanext/charts/templates/scheming/form_snippets/chart_filter.html
index e70b54e..68aa307 100644
--- a/ckanext/charts/templates/scheming/form_snippets/chart_filter.html
+++ b/ckanext/charts/templates/scheming/form_snippets/chart_filter.html
@@ -1,6 +1,3 @@
-{#} HACK, pass resource ID more explicitly #}
-{% set resource_id = data.__extras.resource_id %}
-