This topic is locked

Reset button for Session values

2/13/2007 3:18:13 PM
PHPRunner General questions
R
run4sbc author

I really want for my reset button to be able to clear the session values after one entry has been added. I have it set to save the values to make multiple entries easier for the user. But I want them to be able to hit reset and it clear all the values from the fields. Right now it will clear everything you enter before you save the entry, but after you save it when the session values are set it wont reset all the fields.
Im using build 212
Anyone have any suggestions?

J
Jane 2/14/2007

Hi,
you can do the following:

  1. proceed to the Visual Editor tab
  2. turn on HTML mode
  3. find this code:
    <INPUT class=button type=reset value=Reset>

and replace it with this one:

<INPUT class=button onclick="editform.value_FieldName1.value='';editform.value_FieldName2.value='';" type=button value=Reset>



where FieldName1 and FieldName2 are your actual field names.

R
run4sbc author 2/14/2007

i had a problem and fixed it so i took the post away to avoid confusion

R
run4sbc author 2/14/2007

for some reason I re-did it and it worked fine. Thanks for your help!!!

R
run4sbc author 2/14/2007

One thing....I couldnt get it to reset the radio button. Is there a trick to that too?

Alexey admin 2/15/2007

Sure, here is the code:

onclick="editform.value_FieldName1.value='';editform.value_FieldName2.value='';editform.value_Radiofield='';editform.radio_Radiofield[0].checked=true;"

G
gshafer 9/6/2007

This works great for text fields and checkboxes.
Anyone know how to clear a field that uses the lookup wizard/lookup table ?
.....George