Hi, I'm trying to create an autocomplete for a few fields when adding a biblio. My problem so far is that the ids generated are things like this: *tag_110_subfield_a_361770_300725* (I'm trying to create an author autocomplete). One quick fix for me will be to add to the fields a class containing this: tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %] Should this will be helpful to anybody else? Is there a better way to do this? Regards
I like your idea. Anyway, you can select the field 110a using $('input[id^=tag_110_subfield_a_]') HTH. Stefano Rodrigo Santellan writes:
Hi,
I'm trying to create an autocomplete for a few fields when adding a biblio. My problem so far is that the ids generated are things like this: *tag_110_subfield_a_361770_300725* (I'm trying to create an author autocomplete). One quick fix for me will be to add to the fields a class containing this: tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]
Should this will be helpful to anybody else? Is there a better way to do this?
Regards
Hi Rodrigo, I think what you are trying to achieve should be done using plugins, have a look at the cataloguing/value_builder scripts. Cheers, Jonathan On Mon, 31 Oct 2016 at 20:19 Rodrigo Santellan <rsantellan@gmail.com> wrote:
Hi,
I'm trying to create an autocomplete for a few fields when adding a biblio. My problem so far is that the ids generated are things like this: *tag_110_subfield_a_361770_300725* (I'm trying to create an author autocomplete). One quick fix for me will be to add to the fields a class containing this: tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]
Should this will be helpful to anybody else? Is there a better way to do this?
Regards _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Stefano, This work really good *$('input[id^=tag_110_subfield_**a_]') *I can select the desired inputs that way without touching anything. I still will propose to add the class that add more data to the field. Jonathan: for what I see the plugins add stuff after the field not in the field like I want. Thanks for the help! Regards On Tue, Nov 1, 2016 at 7:38 AM, Jonathan Druart < jonathan.druart@bugs.koha-community.org> wrote:
Hi Rodrigo,
I think what you are trying to achieve should be done using plugins, have a look at the cataloguing/value_builder scripts.
Cheers, Jonathan
On Mon, 31 Oct 2016 at 20:19 Rodrigo Santellan <rsantellan@gmail.com> wrote:
Hi,
I'm trying to create an autocomplete for a few fields when adding a biblio. My problem so far is that the ids generated are things like this: *tag_110_subfield_a_361770_300725* (I'm trying to create an author autocomplete). One quick fix for me will be to add to the fields a class containing this: tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]
Should this will be helpful to anybody else? Is there a better way to do this?
Regards _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
participants (3)
-
Jonathan Druart -
Rodrigo Santellan -
Stefano Bargioni