Developer Support »

Form reset button does not work  (See more user questions)

Thanks again for your feedback

I don't know about you, but I never use reset buttons. In the case of an
error, the visitor wouldn't reset the form, they would just correct the
error, so I don't think there is any harm in removing the reset button.

Best wishes.

Charles Sweeney
https://formtoemail.com
The world's easiest feedback script!

----- Original Message -----
Sent: Thursday, March 12, 2009 8:20 PM
Subject: Re: FormToEmail-Pro script


Hi Charles,
After further testing, we found a problem. If you click reset once, complete
the form successfully and click the browser's back button, the reset button
does not work. That’s because the reset button redirects you to the same
“reset” URL. If we were not using the tabs, I think it would work. At this
point, we're going to remove the reset button.
Thanks,

On Thu, Mar 12, 2009 at 2:34 PM, FormToEmail.com wrote:

> That sounds good,
>
> I figured there might be a JavaScript solution but I don't know much
> JavaScript.
>
> I will look into it, at least if I can put something on the support
> section, it could be of use to other customers.
>
> Thank you very much for your feedback.
>
> Best wishes.
>
> Charles Sweeney
> https://formtoemail.com
> The world's easiest feedback script!
>
> ----- Original Message -----
> Sent: Thursday, March 12, 2009 5:54 PM
> Subject: Re: FormToEmail-Pro script>
>
> Hi Charles,Yes, the reload does work and I do have the "housekeeping"
> code
>> at the bottom. The problem with this form is the use of Spry tabs. Upon
>> reload, the page returns to the default tab, which has video and not the
>> form. Clicking back to the email tab does show a blank form, but loading
>> a
>> video on reload will really confuse users.
>>
>> To resolve, I'm using a Javascript redirect button named "Reset" and
>> having
>> the redirect URL be the page's URL, plus an extra parameter in the URL to
>> yield the right tab and to clear out the form...
>>
>> <INPUT type="button" value="Reset"
>> onClick="location.href='video.php?reset=y&tab=4#TabbedPanels1'">
>>
>> So far it seems to work but I need to keep testing.
>>
>> Thanks,
>>
>>
>> On Thu, Mar 12, 2009 at 12:21 PM, FormToEmail.com
>> >wrote:
>>
>> Hello again
>>>
>>> I got you slightly wrong the last time. I was confusing a page refresh
>>> with a reset button.
>>>
>>> As far as I can tell, the reset button will not work if a visitor
>>> returns
>>> to the form after an error. I think this is because PHP has printed the
>>> values in the form, not the visitor. I don't know if there is a way
>>> around
>>> this. It looks like a PHP/browser issue.
>>>
>>> That said, refreshing the page will clear the form. This assumes you
>>> have
>>> this code on the form page after the form code:
>>>
>>>
>>>
>>> if(isset($_SESSION['submitted_form_values'])){unset($_SESSION['submitted_form_values']);}
>>>
>>> You can get more information on this, here:
>>>
>>> https://formtoemail.com/developersupport/pre_populate_form.php
>>>
>>> I will get back to you if I can find more information about this.
>>>
>>>
>>> Best wishes.
>>>
>>> Charles Sweeney
>>> https://formtoemail.com
>>> The world's easiest feedback script!
>>>
>>> ----- Original Message -----
>>> Sent: Thursday, March 12, 2009 4:10 PM
>>> Subject: FormToEmail script
>>>
>>>
>>>> Comments: Hi - thanks for the new version. I am using the pre-populate
>>>> function which works on return to form, repopulating the form after
>>>> clicking
>>>> back from an error page. However, the reset button, which should clear
>>>> the
>>>> form, does not work. The sample code you offer on your page at
>>>> https://formtoemail.com/developersupport/pre_populate_form.php only has a submit
>>>> button, not a reset button. Does this function work with a reset
>>>> button?