[ckan-dev] Conditionally add fields to the add dataset form

Ian Ward ian at excess.org
Fri Mar 7 16:49:57 UTC 2014


On Fri, Mar 7, 2014 at 7:21 AM, Pieter Colpaert
<pieter.colpaert at okfn.org> wrote:
>
> What I'm trying to do in the CKAN The DataTank extension [2] is to add
> fields (see screenshot) when a certain format is chosen. The docs however
> have not been very helpful in explaining how to do this... Any help here?

You can override the resource editing form to have it display extra
fields when the format is selected. Resources can have as many extra
fields as you like, just include them in the form.

The template to override is templates/package/snippets/resource_form.html

Ian



More information about the ckan-dev mailing list