Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Pre-Defined Search Link (via URL?)

Featured Replies

I'm trying to create some simple links on a Site Assistant created home screen to a few often-used search queries. I can't figure out how to construct such a link in the PHP code, though. The search parameters seem to be stored in the session, and if it is possible to construct such a search via a URL (for example: http://www.site.com/recordlist.php&-name="Fred"&-job="Boss") I can't seem to tease out the logic of it. Any ideas? Thanks much.

  • Author

I've made some significant headway on this. In the end, I had to construct some forms composed of hidden fields with submit buttons styled to be images (also could be text if need be).

The Site Assistant saves the search parameters in the session after the POST action. From there it parses they keys and values based on numerically named fields. 0 and even numbers are translated to operands and odd numbers are the search values. For example:




     

     

     

     

     

     

     

     



For this to work the $layoutName variable has to be copied from the top of the findrecords.php file.

The Site Assistant code interprets the keys that begin with a dash as general search params, and ones without as the keys and values to build the search with.

This strategy works fairly well, but I am not sure yet how compound finds with work.

  • Author

I've discovered a more serious problem than how to construct a compound find command with this strategy.

As it is right now, these forms will return the whole set of records. If you do a find through the Site Assistant generated form in the findrecords.php page AND THEN go back and click the form constructed above, then it will work. Somehow the findrecords.php page is setting something up in the session that isn't being constructed by my cobbled-together method.

  • 4 weeks later...

Caveat: Site Assistant generated pages can quickly become a nightmare once you start modifying them. If you need custom pages you're much better off building them from scratch

To answer your question: When php loads the page it will set the key value pairs from the URL to the $_GET associative array




/* for http://www.site.com/recordlist.php&name=Fred&job=Boss */



print $_GET['name']; /* prints Fred */

print $_GET['job']; /* prints Boss */



Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.