I have a search form at the side bar whose results are shown on
another page.
Now I want to improve the results page with a second search form to
let the
user refine the search terms. So I have to pass the search terms from
the first
form to the second one. I tried a first rudimentary system, storing
the query
in page data. Now I'm tryng to use POST vars, but it doesn't work
fine.

===== 1) Query stored in page data

This works, but it's not a good idea because every visitor would
modify the
same page data. It would be confussing if several people would use the
search
form at the same time :)

------------------ the side bar form:
[form]
[text query value="{searchresults:query}" ]
[submit "Search"]
[session search "text='{=query}' template=searchresults"]
[session savedata query target="searchresults"]
[session msg]
[session nextpage searchresults]
[form]

------------------ the searchresults page:
[form]
[text query value="{:query}" ]
[submit "Search"]
[session search "text='{=query}' template=searchresults"]
[session savedata query]
[session msg]
[session nextpage {p}]
[form]
[results]


====== 2) Query passed in POST vars

In this case the side bar form works fine only if the visitor is
already on the
results page. Otherwise the [results] markup doesn't show the results
but the
query string! Why? Anyway the query is passed to the results page and
it appears as
default in its input field. A second search, using the second form,
works fine.

------------------ the side bar form:
[form action=searchresults]
[text query ]
[submit "Search"]
[session search "text='{=query}' template=searchresults"]
[session msg]
[session nextpage searchresults]
[form]

------------------ the searchresults page:
[form]
[text query value="{?query}" ]
[submit "Search" ]
[session search "text='{=query}' template=searchresults"]
[session msg]
[session nextpage {p}]
[form]
[results]

I don't understand why [results] is affected this way. I'm blocked
here.

It seems that [session nextpage] is not needed in the side bar form
when "action" is used in [form], is it? Any way it doesn't make any
difference.

Any clue?

Thank you,

Marcos

--
http://alinome.net

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to