ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

{exp:search:keywords} acting weird

July 19, 2010 9:06am

Subscribe [3]
  • #1 / Jul 19, 2010 9:06am

    Jabbler

    59 posts

    I have {exp:search:keywords} on 2 different parts of my search result page, one in the html <title> and a second one in the search form field.

    The code for the HTML title is this

    {embed="en/header" page_title="Search result for {exp:search:keywords}"}

    Code for the form field:

    <input name="keywords" type="text" value="Searched for {exp:search:keywords}" size="30" maxlength="100">

    And this is what EE outputs for the form field:

    <input name="keywords" id="keywords" type="text" value="Searched for <form method="post" action="http://www.website.com"  enctype="multipart/form-data" >
    <div class='hiddenFields'>
    <input type="hidden" name="XID" value="d14a8311f68f16096aa0b78888c6e98cfcd2dd7d" />
    <input type="hidden" name="ACT" value="21" />
    <input type="hidden" name="RET" value="/results/7d1098574d4c145fb1df01ef42ae90d3/" />
    <input type="hidden" name="URI" value="/en/results/7d1098574d4c145fb1df01ef42ae90d3/" />
    <input type="hidden" name="entry_id" value="14" />
    <input type="hidden" name="return" value="en/results" />
    <input type="hidden" name="site_id" value="1" />
    </div>
    
    Clock Custom A1123
    Model: A1233
    
    Size: 24*24*353
    
    Weight: 35kg
    
    Material: Wood + Acrylic
    
    Price: $35
    
    </form>" size="30" maxlength="100" onFocus="doClear(this)" >
  • #2 / Jul 19, 2010 5:18pm

    Ingmar

    29245 posts

    What version and build are you using? When you use default templates, does that work?

  • #3 / Jul 19, 2010 10:04pm

    Jabbler

    59 posts

    I am using 1.6.9, build: 20100430 with CartThrob. Default template works fine.

  • #4 / Jul 20, 2010 3:26am

    John Henry Donovan

    12339 posts

    Jabbler,

    Just to confirm. You have a search form field on your Search Results Page?

    <input name="keywords" type="text" value="Searched for {exp:search:keywords}" size="30" maxlength="100">

    The above wouldn’t be considered intended use.

    I still don’t see why you would want to put that tag into an input tag. Basically if you did and they submitted the form again them they would also be searching the keywords ‘Searched for’ and the exact same keywords that brought them to the results page in the first place.

    Could you explain clearly what you wish to achieve here . Maybe with a screenshot?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases