Skip to Content
avatar image
Former Member

clear form input values

Hi

I hav a form which contains 2 input text boxes.

User clicks on submit and moves to different view after filling form.

these values are mapped to context so that i can display them in next page.

Now wen i click on back button in view2....it takes me back in view 1.

I get my old values already there.

I wish if i could reset my form wen i Travers back to it.

1 method to do so is coding in init() method.

that i reinitialize my context in init method....

but i there any other way to do so....

thanks in advance

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Dec 10, 2008 at 09:52 AM

    hii,

    clear your input node after clicking the backbutton.

    inputNode.invalidate();

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 10, 2008 at 09:56 AM

    Hi Saurabh Agarwal,

    When you return back to Frist view from second view the plug method will execute.

    You can reset the two context attributes in the onPlug method.

    Regards,

    VJR.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 10, 2008 at 10:07 AM

    Hi,

    Invalidate your node in Back Action button.

    Regards

    Raghu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 10, 2008 at 10:15 AM

    I am also new to this.

    But u can use this on ur plug event.

    wdThis.wdGetContext().currentContextElement().setCtx_firstname("");

    wdThis.wdGetContext().currentContextElement().setCtx_lastname("");

    Does anyone know of a better way? like setting a property

    Tell me if it works

    Vikram

    Add comment
    10|10000 characters needed characters exceeded