Commit Graph

7 Commits

Author SHA1 Message Date
Teriuihi cde2a01dd9 Refactor form to use useFormik and FormikProvider
Replaced Formik component with useFormik hook and FormikProvider. This change simplifies the form implementation and separates the form's logic and presentation. The form now benefits from more direct access to formik methods and state.
2024-08-08 21:37:09 +02:00
Peter 4dda70effc Styling for forms 2024-08-08 21:32:37 +02:00
Teriuihi 94c336fb74 Add dropdown and additional info fields to form steps
Updated form interfaces to include optional dropdown and additional info properties. Adjusted form rendering logic to handle these new fields, providing clearer instructions and choices for users. Refined validation messages for consistency and clarity.
2024-08-08 20:33:15 +02:00
Teriuihi 973b6b5e7d Add titles to form data and display them dynamically
Incorporated 'title' property into form data objects for dynamic rendering in the GenericForm component. This enhancement facilitates the use of specific titles for different forms, improving readability and user experience.
2024-08-07 00:41:11 +02:00
Teriuihi f52201b683 Rename variables for clarity and adjust download filename and contents
Renamed the parameter 'e' to 'formikValues' for better clarity in the handleSubmit function. Now load formikValues into the file that get's uploaded so it has the up to date form data. Changed the downloaded JSON filename from 'form_data.json' to 'your_form_data.json' to be more user-friendly.
2024-08-06 23:21:53 +02:00
Teriuihi 997baae4d3 Fix JSON serialization in error handling
Replaced steps variable with userInput for JSON serialization in error handling. This ensures that the correct data is saved as a JSON blob when a network error occurs.
2024-08-06 22:28:41 +02:00
Teriuihi d2f15d2627 Refactor forms to use a generic form component
Replaced the contact form with a generic form component to support multiple form configurations. Moved validation schema and form data to a new structure, allowing dynamic form rendering. Updated the App component to utilize this generic approach for handling different forms.
2024-08-06 21:07:20 +02:00