Skip to main content
Inspiring
February 15, 2007
Question

reset field upon submit

  • February 15, 2007
  • 1 reply
  • 862 views
Hi, I have a search field, which once the page has been submitted I would like to be reset back to the default value, so that when the page loads up with the query results it has been reset to default value, how do I do this please? (I already have onClick in use on the submit button)...

Thanks
    This topic has been closed for replies.

    1 reply

    Inspiring
    February 15, 2007
    Does the form submit to itself?
    Inspiring
    February 16, 2007
    Yes it does, I use the form to filter query data. I have temp fixed it by having preserve data="No", but i kind of liked it preserving as the date fields remained. So if there is another way then great.
    Since my post, I have added a checkbox to my form, so if they tick it the query includes some more criteria, however, it works, but then If I sort again but with the tick box unchecked it still thinks its checked. Can I write something like <cfif #form.checkbox# = 'value'> instead of isDefined, would that be more efficient...?

    Thank you for your reply
    Inspiring
    March 7, 2007
    I have a form I need to change. There are some users of the site who feel they must double-click eveything. They also tend to use the "back" button to submit it again to make sure it went through. To prevent this, I'd like a way to clear the form completely when the submit button is pressed. Your thoughts?

    Bob