Pregunta

I am using form macros to create form fields. But I could not find anything looking at the source code of some of the existing CKAN forms how to set validation rule for a given form field. Any help would be appreciated.

PK

¿Fue útil?

Solución

This depends on which form you're customizing. If you're customizing the add/edit dataset form, you need to write an IDatasetForm extension. If it's the group form, you want an IGroupForm extension. There's no plugin interface for customizing the organization form yet, unfortunately.

To see how to write a CKAN extension, checkout the new writing extensions tutorial (currently in development, feedback appreciated), and also take a look at the example_idatasetform extension that comes with CKAN.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top