Newbies Melvin Antoine Whitehead Posted July 22, 2011 Newbies Posted July 22, 2011 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.
Russell Barlow Posted July 22, 2011 Posted July 22, 2011 See your previous post. http://fmforums.com/forum/topic/79259-omitting-records-in-php-form/
Newbies Melvin Antoine Whitehead Posted July 22, 2011 Author Newbies Posted July 22, 2011 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.
webko Posted July 24, 2011 Posted July 24, 2011 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
Russell Barlow Posted July 25, 2011 Posted July 25, 2011 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.
Recommended Posts
This topic is 5137 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 accountSign in
Already have an account? Sign in here.
Sign In Now