Simple Code for a reset button

S

speaktomenow

Hi I have an infopath form that is sitting in a sharepoint doc library.
On submit it gets emailed to a certain person in our organisation, but
I want to put a Reset button at the bottom. In HTML this is just so
easy to do and I cannot figure out how to do this in infopath. I read
http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=798
but that was no help whatsoever.

I just want some simple code that will allow me to reset the form
onclick.

Is this possible? Can anyone advise?


Thanks.
 
S

steve

put this behind your button if your using visual studio/vb:

Public Sub CTRL2_5_OnClick(ByVal e As DocActionEvent)

thisXDocument.DOM.selectSingleNode("//my:field1").text = " "
End Sub

just do the same thing for each field... there maybe a way to reset
them all with one statement, but i don't know what it is....

the syntax would be simiar to vbscript, javascript, but i don't know
exactly what it would be.

steve
 
Top