I have an order form that capture ORDER_ID, ORDER_TYPE, PARENT_ORDER_ID and other details. The ORDER_TYPE can be of type child or parent. When a user submits a parent order, they child form is loaded afterwards. It will pre-populate the form to be of type child and save the previous form order id as the child's parent id. This part works fine.
Implementation:
I have added deluge script via the On Add Submit so that the parameters are passed via the URL
next_url = "https://creator.zoho.com/<<application account>>/assets/#Form:ORDER?PARENT_ORDER_ID=" + input.ORDER_ID + "&ORDER_TYPE=CHILD";
openUrl(next_url, "Same window");
Problem:
The problem occurs after a user has created a parent order, and they wish to reset the form. As the values have been passed via the URL, when you click the reset button, it passes the ORDER_TYPE and PARENT_ORDER_ID back to the form. Thus, those form values never get reset.
Note, I still want the option for users to be automatically see the child form after they have made a parent order.
How do I fix the reset issue?
I have checked the forums and people have suggested using stateless forms to disable the reset button. However, I do not want to duplicate my form and logic just to hide the reset button. I have order views, that have "Add" buttons that will load the non stateless form.