Conversation
Navy Federal Credit Union
US
Last activity: 14 Jan 2026 9:48 EST
How to clear all form fields in a view after clicking a button or link?
In Constellation, I need to implement a feature where clicking a link or button clears all form fields in a view. This should work like the Reset option we see in the Search & Select control.
- Is there an out-of-the-box way to achieve this in Constellation?
- If not, what’s the recommended approach (e.g., Data Transform, action configuration)?
- Any best practices for ensuring the UI refreshes properly after clearing the fields?
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Novitates
IN
@Pankaj_C As such there is no OOTB feature for this requirement.
Also if you want to implement a custom link/button which clears all the fields to blank/default values in the current view it is configured in, you might have to include this link/button in every view specifically.
May be including this link/button component in the override case instructions ( Paragraph rule [v24], Dynamic Text [v25] ) would be a good fit without disrupting the view and reusing the instructions rule in all views. You component should be intelligent enough to lookup to all the fields in the current view to clear the content. May be setting up TestId values with a standard naming convention would help here. I am just thinking loud.
Please note that if you choose instructions approach, custom link/button powered by correspondence rule works in v24 but it wont in v25. Refer to the below article where i have posted my reply on the same lines,
Instructions links to be opened in new tabs in DX API
The next approach would be to include the link/button component in each of your view wherever you have form fields. This approach would be good if you have very few screens to implement the reset functionality.
@Pankaj_C As such there is no OOTB feature for this requirement.
Also if you want to implement a custom link/button which clears all the fields to blank/default values in the current view it is configured in, you might have to include this link/button in every view specifically.
May be including this link/button component in the override case instructions ( Paragraph rule [v24], Dynamic Text [v25] ) would be a good fit without disrupting the view and reusing the instructions rule in all views. You component should be intelligent enough to lookup to all the fields in the current view to clear the content. May be setting up TestId values with a standard naming convention would help here. I am just thinking loud.
Please note that if you choose instructions approach, custom link/button powered by correspondence rule works in v24 but it wont in v25. Refer to the below article where i have posted my reply on the same lines,
Instructions links to be opened in new tabs in DX API
The next approach would be to include the link/button component in each of your view wherever you have form fields. This approach would be good if you have very few screens to implement the reset functionality.
General Note: Be very sure to implement custom dx components only when the requirement is critical for business operations and you have a seasoned UI developer taking care of the maintenance, security and accessibility aspects.
Other than this i can't think of any other approaches. May be our community members can pitch in here if they have any other ideas, feelings or thoughts.
Regards
JC
-
Pankaj Chopra
Pegasystems Inc.
SE
@Pankaj_C I would do it from an optional action.
I think the reset option and clearing fields in a form are not comparable. Clearing search fields is one thing, search fields are ephemeral/temporary by nature, and it makes sense to discard them quickly. Field data however is not. Field data is important data that you probably don't want to clear unless absolutely certain. I think using a button to clear it might have been a common way of solving this scenario in traditional UI, but thinking about it it feels "unsafe". Clicking a button and immediately wiping all data probably doesn't instill confidence in users.
Down the line, you will likely get the requirement that a confirmation popup should be shown when clicking the button - "are you sure you want to wipe the fields?". Then you would anyway look at launching a flow action to support this.
So - I would introduce an opitonal action scoped to the correct stage. On its view I would add no fields, only an instruction text saying "Are you sure?". Then have a post-process DT that clears the fields. In this way you have a controlled way of clearing the form, where end users don't feel that a simple misclick will wipe their precious work.
Added some screenshots of sample setup.
-
Jayachandra Siddipeta
Novitates
IN
That said, it’s also important to look at this approach from a practical user-experience and maintainability lens as well.
Using an Optional Action with a confirmation view typically results in a three-click interaction:
- Click the optional action navigation menu
- Select the clear fields option
- Confirm the action
While this is absolutely safe and fully out-of-the-box, it does introduce a bit of interaction overhead compared to a traditional “Reset” button. For users who frequently work with large or repetitive forms, this may feel slightly slower and may require some user training to set the right expectations.
There are a few additional considerations as well:
-
Reusability across views Optional actions are scoped to stages and case types. If the same “clear form” behavior is needed on multiple screens or views, you may end up creating multiple flow actions and post data transforms, which can add to rule maintenance over time.
That said, it’s also important to look at this approach from a practical user-experience and maintainability lens as well.
Using an Optional Action with a confirmation view typically results in a three-click interaction:
- Click the optional action navigation menu
- Select the clear fields option
- Confirm the action
While this is absolutely safe and fully out-of-the-box, it does introduce a bit of interaction overhead compared to a traditional “Reset” button. For users who frequently work with large or repetitive forms, this may feel slightly slower and may require some user training to set the right expectations.
There are a few additional considerations as well:
-
Reusability across views Optional actions are scoped to stages and case types. If the same “clear form” behavior is needed on multiple screens or views, you may end up creating multiple flow actions and post data transforms, which can add to rule maintenance over time.
-
Consistency of behavior Because the clearing logic lives in post-processing Data Transforms, teams need to be disciplined in keeping the logic consistent across actions. Small differences in DTs can lead to subtle inconsistencies in what gets cleared and what doesn’t.
-
Discoverability for end users Optional actions are intentionally less prominent in Constellation. Some users may not immediately discover the capability unless it is clearly labeled or explained during onboarding.
Overall, the optional action pattern strikes a good balance between safety and platform alignment, especially for business-critical data. However, teams should be aware of the extra clicks, training needs, and reuse considerations, and evaluate whether this approach fits the specific user journey and frequency of use.
Sometimes, it becomes less about technical feasibility—and more about thoughtful UX trade-offs within Constellation’s design philosophy.
While the confirmation popup seems to be a very good idea, it can be easily embedded into custom link/button component click as well.
Regards
JC
Navy Federal Credit Union
US
@LantzAndreas Thanks for your response! In our case the form fields are related to search, so I feel the optional action is not suitable for it. I am inclined toward clear rest of the search value fields based on search parameter options for now, because I don't see a clean ootb way. I did see a clear x icon for data time control in Constellation UI though, it would have great to have something ootb.