[ckan-dev] wanted: js module / form snippet to dynamically add/remove fields
Harald von Waldow
harald.vonwaldow at eawag.ch
Fri Jan 29 15:58:01 UTC 2016
Hey Brook,
Thank you so much! Works like a charm, saved my day!
Best,
Harald
On 29.01.2016 10:10, Brook Elgie wrote:
> Hi Harald,
>
> Yes! We did exactly this with ckanext-repeating and the author field.
>
> Here's the relevant JS and template:
>
> https://github.com/okfn/ckanext-lcrnz/blob/master/ckanext/lcrnz/templates/package/snippets/package_metadata_fields.html
>
> https://github.com/okfn/ckanext-lcrnz/blob/master/ckanext/lcrnz/fanstatic/lcrnz-repeating.js
>
> Good luck!
>
> Brook
>
> On 28 January 2016 at 19:33, Harald von Waldow
> <harald.vonwaldow at eawag.ch <mailto:harald.vonwaldow at eawag.ch>> wrote:
>
> Hi,
>
> I wonder whether someone has some code that would add "remove" and "new"
> buttons to a form-field so that the user can dynamically choose for
> example how many "authors" she wants. Basically pimping up
> ckanext-repeating.
>
> Thanks,
> Harald
>
>
> --
> Harald von Waldow
> Eawag
> ICT Services
> Ueberlandstrasse 133
> 8600 Duebendorf
> http://www.eawag.ch
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org <mailto:ckan-dev at lists.okfn.org>
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
--
Harald von Waldow
Eawag
ICT Services
Ueberlandstrasse 133
8600 Duebendorf
http://www.eawag.ch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160129/f093bcc4/attachment-0003.sig>
More information about the ckan-dev
mailing list