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.

Labels for form elements

edited September 2018 in Pawtucket

Hi,

I am working on the customisation of a library archive website, and am trying to work out how to add labels to form elements, but cannot work out how to do this. For example, i can see this:

<span class='formLabel' data-toggle="popover" data-trigger="hover" data-content="Search across all fields in the database.">Keyword</span> {{{_fulltext%width=200px&height=1}}}

I would prefer it to be something like this when output:

<label for="example-id">Form label</label> <input type="text" id="example-id" name="example-name"/>

How would I achieve this?

Thanks in advance!

John
:-)

Comments

  • Hi John. Looks like you're trying to customize an advanced search form? Assuming it is for objects, you would need to adjust this file: /themes//views/Search/ca_objects_advanced_search_objects_html.php

  • Hi Maria,

    Yes, I have found that file, but all I can see is this for the form fields:

    <span class='formLabel' data-toggle="popover" data-trigger="hover" data-content="Search across all fields in the database.">Keyword</span> {{{_fulltext%width=200px&height=1}}}

    While I can see how I could convert the span into a label, I cannot work out how to get at the form element to add an associated id attribute.

    Help!

  • Unfortunately that is not supported since the form elements are automatically inserted. You could write your own html for the form if like.

  • If I was more skilled in the ways of Pawtucket I could. :-)

    I tried creating the form elements manually but then the form stopped working.

  • My suggestion would be to copy the source code of the functioning form containing all the elements you want to include and then carefully modify it. Basically use the standard form as your starting point. Not ideal, but should work.

Sign In or Register to comment.