Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.


If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping


Answers may be delayed for posts that do not include sufficient information.

Customizing advanced search in Pawtucket2

I want to redesign advanced search form in Pawtucket2 such that it includes a few checkbox, drop down and tab controls. I was wondering if it is possible to do, if yes, any information how to achieve this?

Comments

  • edited August 2016
    Hi naeemmuhammad,

    You can create a custom advanced search in the search.conf file (see http://docs.collectiveaccess.org/wiki/Pawtucket2:Advanced_Search for a description)
    You can then create the new form named in the view field of your newly defined search using display bundles. To define a checkbox add render=is_set to the end of the bundle specifier (e.g. ca_objects.public_access%render=is_set). Adding a search field for a field controlled by a list or set vocabulary will automatically populate as a dropdown.  The render value for radio buttons is radio_buttons.

    Then, you can simply format the advanced search view to work with the jquery ui tabs.  
    You can use any php/html throughout the view as you would on any other page. Just the advanced search form itself adheres to the specialized markup.

  • edited April 2018
    Hi sophie,

    could you specify how this would work: „Adding a search field for a field controlled by a list or set vocabulary will automatically populate as a dropdown.  “

    I can use

     {{{ca_list_items.preferred_labels%restrictToRelationshipTypes=type-id}}} 

    to search on related vocabulary terms with a restriction to one relationship type but I’d like to have a dropdown menu to choose from options.

    Thanks! 
  • Hi kbecker,

    If you change the element code to ca_list_items.item_id, you can use select=1 to display the values as a dropdown list.  Your list items will need to be set to "accessible to the public" to appear in this list.
  • Hi sophie,

    thanks for your help!
    Unfortunately I don’t quite get it: I want to search for objects with related vocabulary terms which are pulled from a list. Do I use

    {{{ca_list_items.list-code%select=1}}}
    {{{ca_list_items.list-id%select=1}}}
    {{{ca_list_items.item-id-of-root-node-list-item%select=1}}}

    ? (None of those work for me)

    When I use {{{ca_list_items.item_id%select=1}}} I get a drop-down menu but no values are there to choose from (I didn’t specify which list to use!). All list items are set to be accessible to the public.

    How can I choose which list to populate the drop down from?

    Thanks!
  • Hi kbecker,

    Normally I would expect the following to work:

    {{{ca_list_items.item_id%width=200px&height=1&select=1}}}

    However, the select option was developed for relationships between record types, so it's possible it hasn't been configured to work with list items.  I don't think there's a way to restrict the dropdown to a particular list.  If a type-ahead option could work for you, you could try:

    {{{ca_list_items.preferred_labels%width=200px&height=1&autocomplete=1}}}

    Alternatively, metadata elements of type "list" are configured to automatically display as a dropdown, so if you altered your setup a bit you could configure the form that way. ie:

    {{{ca_objects.metadata_element_code%width=200px&height=1}}}
Sign In or Register to comment.