SimpleSearch and getReqParam

I have a job search form that allows the site visitor to select from one of 4 job types and then enter a keyword(s) to narrow it down. All working fine. If the visitors does not enter a keyword, how do I show them all the jobs from the job type they selected. The job types are parent documents, each containing the relevant jobs. I’m using the following call…

[[!SimpleSearchForm? &landing=`129` &ids=`[[getReqParam? &name=`parent`]]` ]]

I think the property &ids exists only for the snippet SimpleSearch (and not for SimpleSearchForm).

Does it work if you call getReqParam uncached (with the !)?
[[!getReqParam? &name=`parent`]])

It does appear to be working with SimpleSearchForm when a keyword is entered. I’m looking to go to the parent resource when no keyword is entered but when a job type (parent resource) is selected

I’m missing a step here - I need to look at this again

SimpleSearch doesn’t work when there is an empty search string.

So you either have to remove these checks in the SimpleSearch snippet, or you have to run your own snippet on the landing page, that for example executes getResources/pdoResources, when the search-parameter is empty.

1 Like

Yes - you’re quite right and that’s what I just sussed out from the link below, so a double thank you! Used getResources.

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.