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

Pieter Colpaert pieter.colpaert at okfn.org
Fri Mar 7 12:21:14 UTC 2014


Hi CKAN developer's list,

I'm working on http://data.opendataforum.info. Over there we have an 
integration with The DataTank [1], which when the content-type of the 
opendataset is supported by The DataTank, it will automatically also add 
the meta-data to The DataTank. The problem is however that The DataTank 
needs more meta-data fields when a certain format has been chosen. E.g., 
for CSV, this is for instance the location of the header row, or the 
delimiter.

The DataTank publishes these parameters in a JSON file on each The 
DataTank instance. For instance, at 
http://demo.thedatatank.com/discovery you can find a list of all the 
required and optional parameter for each content-type that can be added.

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?

Kind regards,

Pieter

[1] http://thedatatank.com
[2] https://github.com/tdt/ckanext-tdt

-- 

+32 486 74 71 22

Open Knowledge Foundation Belgium
http://okfn.be

Open Transport Working Group OKFN
http://transport.okfn.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140307/3acd8bd2/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2014-03-07 13:02:56.png
Type: image/png
Size: 105937 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140307/3acd8bd2/attachment-0002.png>


More information about the ckan-dev mailing list