Jump to content

Search the Community

Showing results for tags 'search form'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 8 results

  1. Hi! I tried to implement a simple site search like in the regular site profile by Ryan. http://demo.processwire.com/regular/ I checked out the code on github but I could not make it work for my site. Probably because Ryan uses some advanced output strategy and uikit specific stuff which I don't use or understand. For my site I just use: - 1 template (name: templatetoparea.php) for the toparea of my site - 1 template (name: templatemainare.php) for the main content of my site - 1 template (name: templatefooterarea.php) for the footerarea of my site. Also I have prepared two empty templates: - 1 template (name: templatesearch.php) for the search itself - 1 template (name: templatelistsearch.php) for listing the search results May somebody could let me know how to implement a very basic site search like in the regular site profile without using any module or complicated output strategies. Two things would be a must have: - The search should work with standard repeaters (where most of my content lives) - The search results/hits should be listed and the search word(s) should have a yellow colored background (inline css is fine)
  2. I would like to create a search form with a category selection. I do not get the selector, I need help my selector $katId = $pages->find("template=leftnav_kat, h1_h6_1%=$kat"); its ok $matches = $pages->find("template=site, has_parent=$katId"); its ok myresult this pages (templates = site): MedLab ML +2 °C bis +8 °C 41 Liter MedLab ML +2 °C bis +8 °C 41 Liter MedLab ML +2 °C bis +8 °C 45 Liter MedLab ML +2 °C bis +8 °C 82 Liter MedLab ML +2 °C bis +8 °C 82 Liter LabStar Sanguis +2 °C bis +6 °C 100 Liter MedLab ML +2 °C bis +8 °C 107 Liter LabStar Sanguis +2 °C bis +6 °C 100 Liter MedLab ML +2 °C bis +8 °C 82 Liter but I'm looking for a text in the template = site, this template has a field search_cache $katId = $pages->find("template=leftnav_kat, h1_h6_1%=$kat"); its ok $matches = $pages->find("template=site, has_parent=$katId, search_cache%=Industrie"); not work I need help
  3. Hello, and thanks again for PW. The more I use it, the more I like it. I have a silly problem, and since I have tested several (bad) solutions, I come and ask for help. I think I'm just being thick there... Is there a relatively simple way to add an allowed character to the default search form's sanitizer ? FYI, I'm working on a dictionary in breton language (60k entries), and I must find a way to allow apostrophes in search input. (In breton language, "CH" and "C'H" are actually two different letters altogether). I must say I'm a bit confused by the sanitizer. On the regular search form, it appears three times. Once in the input field itself, and twice on the search template. I did read the sanitizer page and sanitizer class page, but I'm not sure to understand where to go from there. From what I understand, the $sanitizer->name methods would accept some extra allowed character, but I seem to have no luck in adding this to my template. Morevover, do I have to change any sanitizer call to a -> name one ? The sanitizer php core page includes an "allowedASCII" which seems very promising, but is there a way to override it ? Hooks ? (not used to them I'm affraid...) Morevover, the fact that i'm trying to implement the (') character worries my a bit. Can I escape it ? would something like '\'' do the trick ? Thank in advance to you, good men. The site building is reaching an end, and I am tired indeed. (you wouldn't believe the state of the initial DB I had to work from...)
  4. Need some help with these this filter if anyone can point me in the right direction. I altered the below from the skyscraper profile to meet my needs, but can not seem to get it to work in my case. The actual drop down on the form works properly displaying all locations, but I cant get the output to search what is selected. What am I missing? I am trying to grab all the employees when a specific location is selected. My structure is root Location 1 - employee -- jane doe -- jone doe Location 2 -employee -- jane smith form drop down for child page <select name="location"> <option value="">any</option> <?php foreach($pages->get("/")->children("id!=10") as $location) { $selected = $location->title == $input->whitelist->location ? " selected='selected' " : ''; echo "<option$selected value='{$location->id}'>{$location->title}</option>"; } ?> </select> output for child page if($input->get->location) { $location = $pages->get("template=location" . $sanitizer->pageName($input->get->location)); if($location->id) { $selector .= "location={$location}, "; $input->whitelist('location', $location->name); }}
  5. Hi forum i need to make a search form to search filter property fields like the Skyscrapers profile i download and try to find out how to do it but i am confused.. the pages layout is like this Property Sales Houses | Maisonettes | Apartments | Villas --Apartments -- Villas -----Luxury Stone Villa 455tm Plots Commercial Properties i need a search engine to search this fields City Town Property Type Property Title it will be perfect if somebody that have made a search form with filters and can find time to post a step by step guide how to do.. (i am so newbie) thank you in advance and sory for my bad english
  6. I'm trying to implement a different version of the search form for my site. The original and functioning code for the search form is this: <form id='search_form' action='<?php echo $config->urls->root?>search/' method='get'> <input type='text' name='q' id='search_query' value='<?php echo htmlentities($input->whitelist('q'), ENT_QUOTES); ?>'/> <button type='submit' id='search_submit'>Search</button> </form> I want to have an input field to be "hidden" and when clicked on "search" then the input field is revealed and upon return the search query is submitted. So I implemented this code to do that: <form id='searchform' action='<?php echo $config->urls->root?>search/' method='get'> <input type='hidden' name='q' id='search_query' value="<?php echo htmlentities($input->whitelist('q'), ENT_QUOTES); ?>"/> <input id="searchterm" name="searchterm" type="text" value="Search" /> </form> And my jquery is: $('#searchterm').focus( function(){ if ( $(this).val() == 'Search' ){ $(this).val('') }; $(this).addClass('searchinputfocused'); }); $('#searchterm').blur( function(){ if ( $(this).val() == '' ){ $(this).val('Search') }; $(this).removeClass('searchinputfocused'); }); However, when I submit a query, it does not return a valid search and nothing is revealed. Does anyone know why not and how I can fix this?
  7. Sorry for this dummy question, I'm newbie for processwire. I try to make new field for search form from "drop down module" but nothing happens. Take a look: <select id='country' data-placeholder="Country" placeholder="Country" name='country'> <option value=''></option><?php foreach($country as $count){ $selected = $count == $input->whitelist->country ? " selected='selected' " : ''; echo "<option value='$count'>$count</option>";} ?> </select> What am I doing wrong? Cheers, a.
  8. The search form on the basic install works fine and is great... But if I add a new text field, i can't get it's content to appear in my search results. Do i need to configure new fields somehow to make them 'searchable' ? alex
  • Create New...