[CKAN-support] Trouble with adding a custom field but not using form.input()

Nigel Babu nigel.babu at okfn.org
Tue Mar 18 04:50:16 UTC 2014


Oh good. Glad to know you have everything working now.

Nigel Babu

Developer  |  @nigelbabu <https://twitter.com/nigelbabu>

The Open Knowledge Foundation <http://okfn.org/>

Empowering through Open Knowledge

http://okfn.org/  |  @okfn <http://twitter.com/OKFN>  |  OKF on
Facebook<https://www.facebook.com/OKFNetwork> |
Blog <http://blog.okfn.org/>  |  Newsletter<http://okfn.org/about/newsletter>

 CKAN | http://ckan.org/ | @CKANproject
<http://twitter.com/CKANproject> |the world’s leading open-source data
portal platform


On 18 March 2014 10:12, Carlos Quiros <cquiros at qlands.com> wrote:

> Hi,
>
> I fixed. It was because I'm using a tagging java script library
> (tagmanager.js) and it adds a hidden field to the form to store the tags so
> CKAN was not able to properly put the value.  After some config in the lib
> all works ok.
>
> Thanks
> Carlos
>
>
> Sent from Samsung Mobile
>
>
>
> -------- Original message --------
> From: Nigel Babu <nigel.babu at okfn.org>
> Date: 18/03/2014 07:33 (GMT+03:00)
> To: Carlos Quiros <cquiros at qlands.com>
> Cc: support at ckan.org
> Subject: Re: [CKAN-support] Trouble with adding a custom field but not
> using form.input()
>
>
> Hey Carlos,
>
> I somehow missed this support request. I'll get back to you today about
> this.
>
> Nigel Babu
>
> Developer  |  @nigelbabu <https://twitter.com/nigelbabu>
>
> The Open Knowledge Foundation <http://okfn.org/>
>
> Empowering through Open Knowledge
>
> http://okfn.org/  |  @okfn <http://twitter.com/OKFN>  |  OKF on Facebook<https://www.facebook.com/OKFNetwork> |
> Blog <http://blog.okfn.org/>  |  Newsletter<http://okfn.org/about/newsletter>
>
>  CKAN | http://ckan.org/ | @CKANproject <http://twitter.com/CKANproject> |the world’s leading open-source data portal platform
>
>
> On 11 March 2014 16:24, Carlos Quiros <cquiros at qlands.com> wrote:
>
>>  Hi,
>>
>> I am adding a custom input field that is *working* with the following
>> code:
>>
>> {{ form.input('ILRI_prjspecies', label=_('Species'),
>> id='ILRI_prjspecies', placeholder=_('Cattle, Pigs, Poultry'),
>> value=data.ILRI_prjspecies, error=errors.ILRI_prjspecies,
>> classes=['control-full']) }}
>>
>> However I need to have the input with a spacial class and *form.input()*add the classes to the <div> and no the <input>. So I decided to write the
>> input without *form.input()* like this:
>>
>> <div class="control-group control-small">
>>     <label class="control-label" for="ILRI_prjspecies">{{ _("Species")
>> }}</label>
>>     <div class="controls">
>>       <input type="text" id="ILRI_prjspecies" name="ILRI_prjspecies"
>> placeholder="Species" class="tm-ILRI_prjspecies tm-input-success" value="{{
>> data.ILRI_prjspecies }}" >
>>     </div>
>> </div>
>>
>> However is does not load or save the value.
>>
>> Any idea what I am doing wrong?
>>
>> Thanks,
>> Carlos
>>
>> _______________________________________________
>> ckan-support mailing list
>> ckan-support at lists.okfn.org
>> https://lists.okfn.org/mailman/listinfo/ckan-support
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.okfn.org/mailman/private/ckan-support/attachments/20140318/b80554e7/attachment-0003.html>


More information about the ckan-support mailing list