Code Generator > List Page: see only the records created by the user

14 posts by 3 authors in: Forums > CMS Builder
Last Post: June 24, 2023   (RSS)

By Dave - June 20, 2023

Hi Andreas, 

Are you referring the the list of records in the CMS itself? Or the list of records you see when you create viewer code and are viewing that PHP file through the browser? 

Let me know and I'll try to help, thanks!

Dave Edis - Senior Developer
interactivetools.com

By Dave - June 22, 2023

Hi Andreas, 

Ok, when the generate the view code you can either check the "Allow Searching" checkbox, or manually set that option to true in the generate code as follows:

'allowSearch' => true,

You can create a special link that only lists specific records. Just add a ("?") after your url, following by the search conditions (fieldname=value).
Example: listViewer.php?color=blue

Multiple search conditions can be combined with ("&").
Example: listViewer.php?color=blue&size=XXL

Those search for exact matches, but if you add _keyword to the end it will check for the search term anywhere in the content:
Example: listViewer.php?title_keyword=ai

You can create search forms by naming the fields after what you want them to search. Here is a simple search form that searches the "title" field for a keyword.

<form method="POST" action="?">
<input type="text" name="title_keyword" value="">
<input type="submit" name="submit" value="Search">
</form>

 I'd recommend experimenting with modifying the URL and creating forms and refer to our search documentation here: 
https://www.interactivetools.com/docs/cmsbuilder/viewer_search.php

Hope that helps! Let me know any other questions.

Dave Edis - Senior Developer
interactivetools.com

By andreasml - June 24, 2023

Hi Dave

It worked! At least I managed to make a simple search form. I will experiment a bit and I might come back with any questions if needed. 

Kind regards, 

Andreas