Yes, well the Simple Search Action would need to do some fairly complex things to route around how Freeway builds forms. Freeway, since the dawn of time, has mandated that one page equals one form. The Multiple Form Action was Softpress’s only concession to the need to build more than one form on a page, and like many hacks, it’s not particularly friendly.
What I did very quickly was to put an instance of Simple Search alone on a page, up in the top-left corner of that page, and then carve that HTML item out using the TemplateHelper Action. This gave me an HTML file called _search_form.html (and since I checked the box to “Move form element into partial”, I got this partial:
<div>
<form method="get" action="results.html">
<p class="f-fp f-lp">
<input id="item2" type=text name="q" size=13>
<input name="t" type="hidden" value="1385129779031">
</p>
</form>
</div>
Now the next trick will be to inject that form into each page where it should appear using JavaScript. I would draw an HTML item in the place where the form should go (and large enough to fit it) and then apply Protaculous 2 to the page. The script (and I haven’t written it yet) that I would use in that page would do two things:
- It would inject the _search_form.html partial into the page, outside of the form tag already on the page (the one created by the Mals cart).
- It would locate the placeholder HTML box, and use Prototype’s
clone_position()
method to float the injected form directly over the top of the placeholder. It would be outside of the form tag in the source code order, but would appear (through the magic of absolute positioning) to be inside it.
This is probably an hour or two to write and debug, but once it was working, it could be copy/pasted to all the pages where you need to see that form appear.
Walter
PS: What Softpress could do with this Action is to assume that there would always be another form on the page, and use JavaScript to “submit” the search request, rather than using a real form wrapped around a real form element. Since JavaScript is a baseline requirement for using the search engine at all, there would be no usability hit from this design change.
On Nov 22, 2013, at 9:11 AM, Walter Lee Davis wrote:
Then you need to decide if you want these pages to be searchable. You can’t nest a form inside another form, and these two forms have to be done separately. The only other idea I have at the moment (only one coffee so far today) is to use JavaScript to move the search field outside of the page-level form. Not sure how much work that would be.
Just took a quick look, and it would require some hackery.
Walter
On Nov 22, 2013, at 9:01 AM, t50ufo wrote:
Ah - if that is the case then I would have to add lots of hidden text fields to have each page work. I have lots of these price Tables on this site so it sounds like a lot of extra fields to enter manually to get each to work - I don’t know if I really want to do that.
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options