Reset SimpleForm after submit
-
Finn FeldmannHas successfully completed the online course Introduction8 months ago #44296
Hi everyone,
I’m fairly new to Simplifier and I’m struggeling a little bit with understanding the logic in Simplifier Designer / Process Designer. I have build and Order-App. After submitting the filled order form I want to reset the the form so that all fields are empty again and I can make a new order. I can’t find a setting to reset the form? What is the way to go?
Would be nice to get some hints.
Thanks,
Finn
Jan-Niklas BöhnkeHas successfully completed the online course IntroductionHas successfully completed the online course Basics (100)Armin WinklerHas successfully completed the online course IntroductionHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)8 months ago #44482::Hi Finn,
in addition to Jan-Niklas’s reply, I would differentiate two cases in general:
- You don’t use property bindings to a variable in your form: In that case, the easiest way to reset all form fields after submission is to use a UI action that maps a constant empty string to all the ‘value’ or similar properties of the field widgets
- You have all the input fields in your form bound to a variable (or possibly multiple variables): In that case, you can proceed as Jan-Niklas suggested, and empty that variable instead. This can be done via UI action in the same way as described above by mapping an empty string constant to the variable fields. I would generally recommend using the UI action for this approach as it does not require coding in JavaScript and it should be more efficient to configure it this way. Alternatively though, you can indeed also set the field widgets empty via scripting. You would then have to call the respective widget methods from OpenUI5
If you are not satisfied with the proposed solutions, then please feel free to create a feature request in our Ideas portal so we can make dealing with this use case even easier for you. I think, a widget property on the level of the form itself that automatically empties all fields nested inside would be a valid and good improvement in our standard widget. We would appreciate if you create a feature request for it in our portal. Thank you in advance!
Kind regards,
Armin
Finn FeldmannHas successfully completed the online course Introduction
You must be logged in to reply to this topic.