[ckan-dev] Custom dataset form while keeping free extras

Samuele Santi samuele.santi at trentorise.eu
Tue Sep 3 14:53:08 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I need to add some extra fields to the dataset form, while keeping the
"free extras" functionality.

I spotted this comment in the package_metadata_fields.html template in
the example plugin shipped with ckan master:

```
{# Remove 'free extras' from the package form. If you're using
convert_to/from_extras() as we are with our 'custom_text' field below
then you need to remove free extras from the form, or editing your
custom field won't work. #}
```

I suppose that this means the custom field gets duplicated in the form
(both as the custom field and in the "extras"), with all the
consequences. Am I right?

Is there any "proper" way to add extra fields (with custom editing
widget / validation / ...) while keeping the free key/value fields
functionality?

Did anybody already face this problem and come up with a solution?
Are there any good examples of customized forms like this?

Thanks,

- -- 
Samuele Santi
Trento RISE
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSJffUAAoJEGgM+6dff2m7b/IP/jJJgrCZdbRMWTOalBrHMrPm
9nW/lHqeNDZd+gpARThYDy0NhLlfVE/3YcUX6Hxe0NQ/bDxf1TX8ARsmMJuzLsxx
PSbu+YpSUHXsA/1xpAcZuQt02RfO6Xede8aa2TNJmQecbJTgaA0CmUSlOcZRC+/d
AgkL3Zx2Uit5/VA3j6JIsDEE+FUimn1zql8Q7z566NL4h3FWjPv3KrVYkXDkaS3N
i6dN2XxW4kS3eShIKNlpK5cckmgDCj94F7BjbF/9gWDzB6hR9K6eYQYH7GIrVtQF
sKkWRow1nYcy6foy0ZhmTm7tZZva8wCSl8Vzz0tKb2nobBNeWc2AWiewD/I3m31z
sv5vvtRFBWYH4QaO8K/tddnA/laLKKVnKITOMHGmIdVVS+Ub+n3xCdzPXuv0WpZs
1zyUFWEy3mabcPnxekZ2+26zx6NjjHGDahCXH/xN5/TSD7D3hwJtsEy4O3MaeePQ
03qPTxocQE1iwxfKrS9iikEIHM7g9lL81t4lARzu0FrcXcna70Y5ZRcuMxyPQZd2
jtdtYNiP8V60uL5qBYXry9cS0Z81U/0RzgCWC5uGB8YGKxTQTTBzyMg6PnYu++g7
9cX0uMHDvUZ+zi1EPak8DXSiAQ7SjBDGzw1b5SURsJFuw9ibP54T3lrYCXHxdNkl
rWQKL6bz2pyDf9tarhre
=CCAi
-----END PGP SIGNATURE-----




More information about the ckan-dev mailing list