Clearing Form Components

Clearing Form Components

Comments

  • Hello,

    I have a question regarding clearing the form fields entry when changing from one option to another. I have some logic that will show & hide data fields based on a request type option. When I enter data in a field and then change my request option the fields/grid will be hidden with the cached data. I would like to call a trigger and clear the cached data each time I change the request option. Is there a simple flag or onChange method to clear the cache for certain fields based on displaying different request options? I appreciate your follow-up.

    Thanks,
    Peanut

  • Hi Peanut,
    I put together an attached an example of this behavior. Essentially, all you would need is a data flow that sets any field you want cleared out to a blank value. In this example, I created a dataflow to populate a label with the selection from a drop down. This flow triggers when the selection is changed. I made a second dataflow that simply passes out blank values to the components I wanted cleared. I also set this to trigger when the selection is changed.
    There is a gotcha here where you want to ensure your Flow outputs on the data flow matches the datanames of the components you want cleared. By default they will say Flow:[your dataname]. Simply change them to match the datanames on the components and you will be good to go!

    [color=rgb(127, 140, 141)][font=Roboto][img]att1[/img][/font][/color]
    [color=rgb(127, 140, 141)][font=Roboto][img]att2[/img][/font][/color]

Sign In or Register to comment.