Alex CA

Dynamic Search for Fields list

3 posts in this topic

I am a newbie to Processwire and have been given a task to add some features to a website that has been already been developed.

One of the fields (say Filed A), is of type Page. There are 100+pages in field A.

A template Temp B uses this Field A and just displays the name of the pages of type Filed A selected for the page which uses the template B.

Now, since there are many pages in Field A, it is displayed as a list and its gets difficult to scroll through the entire list in the admin page to find and add a particular entry from Field A.

Could someone guide me if I could have a dynamic search bar for this field A which would work similar to how the search works on the processwire admin page?

I want this search bar to be displayed right above the list of FieldA which will then dynamically improve the results as I type in the search box

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By franciccio-ITALIANO
      Hi, excuse me but I need any suggest...
      I want to create 1 page of my site with 200 plants, 200 description and 200 link to another page.
      I begin put in 1 Template 2 field-text, and I see that it appear in Field-List!
      If I create 200+200+200 field... I see all in tha list!

      BUT

      If I create 200 article by filed-textarea, I don't see it in Field-List!
      I create yet 75 article in 75 pages, but I don't see it in Field-List!

      What I don't understand? :/  
    • By mikeuk
      I've been experimenting with field type Page, to add a page within a page (to replicate a block like system).
      I encountered some issues rendering the results, and while debugging and displaying the $page->fieldtypePage object I realised it was huge. I mean 1 minute to display huge.
      Even though in normal operation, printing out the whole object wouldn't be necessary. However I presume having an object that large must affect site performance.
      I won't be using this field type Page any more because I'm a bit of a fanatic for clean code and good performance. But in general, what do you think? Should this be submitted as a bug? If so, what's the correct procedure for that?
    • By mikeuk
      I'm confused by how Processwire should display custom fields.
      I have Home page set up with a field type Page (called 'blocks'), and that field has one page selected (called 'footer'), and that page contains 3 fields.
      The idea is that this footer page is reusable as a block on any other page, while also being fully editable in the backend (and only needing to be edited once to change on all pages). This is as close to a Drupal blocks approach as I could get.
      In principal, certainly from the backend, this is working fine. It's clear enough for a site editor.
      The issue is how to display this 'blocks' field (the page attached to it and content of fields that page contains). This system only works if I can display that field, without needing to specify or hard code the page name within the field, or fields within that page (because this may change later). The one constant will be that the 'blocks' field is always linked to selected page templates.
      Based on what I understand of Processwire logic, because I display the title with $page->title, I would have expected the following to work:
      $page->blocks or 
      $page->fields->get('blocks') This however only returns what I presume is the field ID.
      I have looked through the docs, but they are light on highlighting typical uses (perhaps an example for each api element that shows how it works and why it exists in relation to backend data to frontend display, similar to the PHP manual. Something perhaps I can help with at a later date).
      I also think this is a type of issue can be a deal-breaker for new users because of the logic gap ($page->title outputs field content, $page->blocks outputs what might be field ID), and us newcomers can be an impatient group!
      So I hope solutions here will be a useful addition to the docs. After I learn how to deal with this, I'll add any info that might be useful for newcomers.
    • By Cengiz Deniz
      I am making a aporism site.  In my main page I put pepople and their apohrisms.
      https://cdeniz.com/kisiler/
      In another page I made tags.
      https://cdeniz.com/konular/
      Finaly i am making tag page. Related aphorisms will be together.
      https://cdeniz.com/konular/sevgi/
      and its source:
      $kisiler= $pages->find("template=kisi,sort=title,repeater_ozlusoz=[ozlusoz_konusu=$page->id]"); $n=1; foreach ($kisiler as $kisi) { foreach($kisi->repeater_ozlusoz as $aforism) { $tags = ''; foreach ($aforism->ozlusoz_konusu as $tag) { $tags .= '<a href="'.$tag->url.'">'.$tag->title.'</a>&nbsp; &nbsp;'; } echo '<p>'.$n.'. <a href="'. $kisi->url .'">'.$kisi->title.'</a> : "<i>'. $aforism->ozlusoz.'</i>"<br/>&nbsp; &nbsp; Etiketler: '.$tags.' </p>'; $n=$n+1; } echo "<hr>"; } I passed very big code issues but now i can not go more. In tag the list related aphorisms come but with other aphorism which are belonging to person.

      Tag is "Sevgi". But second aphorism should be in the list. I could not exclude.
      Sorry for my english. Thank you very much for your helps
    • By Cengiz Deniz
      Hello, I am newbee. This is my first message. I am trying to learn PW. After modx, I loved it very much.
      My question:
      I am tryin to make a site which shows people and their aforism. I made a field but just one aphorism can input.
      How can I add more data to a field ?
      This is my previous page which made with modx : https://cdeniz.com/k105/Nazim-Hikmet.html
       
       
      Thank you