[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Ask about searching



CAUTION: This e-mail originated outside the University of Southampton.
Hi Adam,

I've tried the script you provided, but what about the id of each search box? How to make it display its search results? I also don't understand about preamble phrases.

Please help.

Regards
Agung Prasetyo

On Wed, Jun 2, 2021 at 3:10 PM David R Newman <drn at ecs.soton.ac.uk<mailto:drn at ecs.soton.ac.uk>> wrote:

Hi Agung,

What you might want is a bespoke simple search that only specifies those four fields to be searched upon but this would only give one box rather than four.  So you would then need to put something in the search page's preamble phrase to explain what can be searched upon.  However, from your mockup it looks like this maybe a search you want embedded in your template.  You can hack what would be an advanced search to create this.  Here is a quick go I have had:

<form method="get" accept-charset="utf-8" action="/cgi/search/advanced">
  <input name="screen" id="screen" value="Search" type="hidden"/>
  <input name="dataset" id="dataset" value="archive" type="hidden"/>
  <div class="ep_table">
    <div class="ep_table_row">
      <input name="title_merge" type="hidden" id="title_merge" value="ALL"/>
      <div class="ep_multi_heading ep_table_cell"><span id="title_label"><span id="title_label">Title</span></span></div>
      <div class="ep_table_cell"><input name="title" maxlength="256" aria-labelledby="title_label" type="text" class="ep_form_text" size="15"/></div>
    </div>
    <div class="ep_table_row">
      <input name="creators_name_merge" type="hidden" id="creators_name_merge" value="ALL"/>
      <div class="ep_multi_heading ep_table_cell"><span id="creators_name_label"><span id="creators_name_label">Author Name</span></span></div>
      <div class="ep_table_cell"><input name="creators_name" maxlength="256" aria-labelledby="creators_name_label" type="text" class="ep_form_text" size="15"/></div>
    </div>
    <div class="ep_table_row">
      <input name="keywords_merge" type="hidden" id="keywords_merge" value="ALL"/>
      <div class="ep_multi_heading ep_table_cell"><span id="keywords_label"><span id="keywords_label">Keyword</span></span></div>
      <div class="ep_table_cell"><input name="keywords" maxlength="256" aria-labelledby="keywords_label" type="text" class="ep_form_text" size="15"/></div>
    </div>
    <div class="ep_table_row">
      <div class="ep_multi_heading ep_table_cell"><span id="keywords_label"><span id="keywords_label">Year</span></span></div>
      <div class="ep_table_cell"><input name="keywords" maxlength="256" aria-labelledby="keywords_label" type="text" class="ep_form_text" size="6"/></div>
    </div>
    <div class="ep_table_row">
      <input name="satisfyall" type="hidden" id="satisfyall" value="ALL"/>
      <input value="Search" name="_action_search" type="submit" class="ep_form_action_button" role="button"/>
    </div>
  </div>
</form>

You will certainly need to do a bit of work to get it into a format like the mockup you included by altering the CSS but the search form itself should be sound and perform a search that requires all values entered to match the fields they have been entered against.   As this is your own bespoke form you can modify it to add your own class and id attributes where needed to make it easier to modify your CSS to make the form appear like your mockup.

Regards

David Newman

On 02/06/2021 01:37, Ajunk Pracetio via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.
Hi,

I'd like to ask about searching in EPrints. Is it possible to make a search form like advanced search but without options "All of" and "Any of"?

The search form design is like this below
[image.png]

Maybe someone can help me with this problem?

Thank you.

Best regards,
Agung Prasetyo W.



*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C40b091b75cae455afc6608d926392e1e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637582849290282211%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=yrxm6MguiXqEsw62hJy7U7%2Bt5FOBNsybOEYoHazOsBw%3D&amp;reserved=0
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C40b091b75cae455afc6608d926392e1e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637582849290282211%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=0FjeOo0IXiI47XgmYvQXVhqWd%2BEBcf0r4v6as4NW%2BS8%3D&amp;reserved=0

[https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fipmcdn.avast.com%2Fimages%2Ficons%2Ficon-envelope-tick-green-avg-v1.png&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C40b091b75cae455afc6608d926392e1e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637582849290282211%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=%2BwOT%2BCoAPbiYQbBwaWAnS%2Fe3zV6FLz6fCSln7nExcRE%3D&amp;reserved=0]<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C40b091b75cae455afc6608d926392e1e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637582849290292165%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=10qKrzbNc6SerYGyn5VqdeFaMpxxPyEmQts85kOc1XA%3D&amp;reserved=0> Virus-free. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C40b091b75cae455afc6608d926392e1e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637582849290292165%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Y0KyAyR%2BeJ4I9PhBR8pYtMmwqaDkrSaT1QvWkt2lEYs%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C40b091b75cae455afc6608d926392e1e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637582849290292165%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=10qKrzbNc6SerYGyn5VqdeFaMpxxPyEmQts85kOc1XA%3D&amp;reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20210603/11e4f05a/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 69128 bytes
Desc: not available
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20210603/11e4f05a/attachment-0001.png