Search code examples
htmlcssckan

CKAN Resource form html "Description" field, how/where can I change other fields to be the same size as description?


I am very new to CKAN and any kind of front-end. I have been searching through multiple html/css files and I can't find where I can change the size of the fields in the resources form. (Its where the user can change the metadata from GUI)

I want to change an extra field I made to the same size as the description field. Is anyone familiar with CKAN and knows the file name where I can do this?

enter image description here


Solution

  • The filename where resource fields are is inside ckan/templates/package/snippets/resource_form.html. You can add your own html tags here or use one of the macros. e.g

    {{ form.textarea('desc', id='field-description', label=_('Description'), value=data.desc, error=errors.desc, classes=['your-class') }}
    

    Inside classes label you can add array of classes to apply to the control-group.