• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Delete keywords input field after web app search form submit

Explorer ,
Sep 16, 2012 Sep 16, 2012

Copy link to clipboard

Copied

Hello all,

I'm working on a website and have a question on a specific page:

http://tullystattoo.businesscatalyst.com/raleigh-tattoo-portfolio

My question is: does anyone know a way to clear the 'Keywords' form input field after one submits the search form? For example, if I type in a word like 'color' into the keyword and hit the search button, I am presented with portfolio pieces that include 'color' in the description. However, 'color' still remains in the keyword form input field, so if I decide that I'd like to select the checkbox for 'grayscale' and search by 'technique' rather than 'keyword', the word color still remains in the input field. Dies anyone have any ideas on how I might be able to clear that form field each time a search is performed?

Thank you all in advance - you guys and gals are always great!

I have found an example of a site that has accomplished this found here: http://planmyplay.co.nz/ but I have no idea how they're doing it?

TOPICS
Web apps

Views

794

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Sep 17, 2012 Sep 17, 2012

Hey,

This 'should' work.

You need to insert some javascript/jQuery into you scripts.js file

on one of the blank lines before //Flex slider init

you need to insert:

if (jQuery('.webappsearchresults')[0]) {jQuery('#CAT_txtKeywords').val("")}

Essentially it checks to see if there are search results on the page and then clears the value of the search box.

I don't guarantee this will work but I'm pretty confident, you may have to play around with it a bit.

Cheers

Pat

Votes

Translate

Translate
Guest
Sep 17, 2012 Sep 17, 2012

Copy link to clipboard

Copied

Hey,

This 'should' work.

You need to insert some javascript/jQuery into you scripts.js file

on one of the blank lines before //Flex slider init

you need to insert:

if (jQuery('.webappsearchresults')[0]) {jQuery('#CAT_txtKeywords').val("")}

Essentially it checks to see if there are search results on the page and then clears the value of the search box.

I don't guarantee this will work but I'm pretty confident, you may have to play around with it a bit.

Cheers

Pat

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 17, 2012 Sep 17, 2012

Copy link to clipboard

Copied

Formated your post Pat so it looks better. Was really hard to read

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 17, 2012 Sep 17, 2012

Copy link to clipboard

Copied

LATEST

You guys are awesome - this worked perfectly. Thank you Pat and Liam!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines