July 22, 201114 yr Newbies 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.
July 22, 201114 yr See your previous post. http://fmforums.com/forum/topic/79259-omitting-records-in-php-form/
July 22, 201114 yr Author Newbies 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.
July 24, 201114 yr 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
July 25, 201114 yr 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.
Create an account or sign in to comment