Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4903 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I created a search form using the PHP Site Assistant and would like to limit the results to those records that have a "yes" value in the "Publish to Web" field. I tried adding this at the top of the source code between the php open and close tags:

$find =& $fm->newFindCommand('Web');

$find->addFindCriterion('Publish to Web', 'yes');

$result = $find->execute();

That didn't work; the find commands were ignored.

I then tried adding:

<input type="hidden" name="<?php $fieldName = 'Publish to Web';?>" value="yes">

to the top of the form, which also didn't work.I know pretty much nothing about PHP (hence using the Site Assistant to generate the site). But there must be a simple way for omitting these records. Any advice?

Site can be viewed here: http://lrc-fms.iss.l...20the%20catalog

Thanks.

  • Newbies
Posted

Thanks! However, there is no find command in the code Site Assistant generated. The "find" button just has this:

<input type="submit" class="buttons" name="-find" value="Find Records">

It seems like the find commands and the search form queries can't be used at the same time?

I thought I'd try posting this question in the Site Assistant forum in case there were others out there who had more experience with Site Assistant and could also offer advice.

Posted

There are usually two parts to a Site Assistant generated form - the actual form, where people put in their criteria, and the results page, where the query is actually run and results returned.

It's the second of these that needs some editing to omit certain results.

If you could post the code for the actual search/results, we can probably help...

Cheers

Webko

Posted

There are usually two parts to a Site Assistant generated form - the actual form, where people put in their criteria, and the results page, where the query is actually run and results returned.

It's the second of these that needs some editing to omit certain results.

If you could post the code for the actual search/results, we can probably help...

Cheers

Webko

He got it fixed up via a chat room discussion. He hardcoded his find request function to include that criteria since that was the only part of his generated site that was using the find request.

This topic is 4903 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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