There is an html form that consists of several fields. In one of the fields of type select, the user can select several options, and in addition, next to this field there is a button "add your own version". When you click on this button, the user is redirected to a page with a new form, where he enters his version, sends it and returns to the page with the first form.

How to do so using only python tools so that previously entered data in the first form is preserved after returning from the second form.

  • @hyral, If you are given a comprehensive answer, mark it as correct (click on the check mark next to the selected answer). - Vitalina

2 answers 2

If you want purely python, you make a submit type button, and put the data into the session, or into the database with the flag active = False. But I would do it on the client, put the data in cookies or localStorage. Almost sure there is a ready-made library for jQuery, for example.

    As one of the options - write to the session