{"id":26315934,"url":"https://github.com/samirasiavash/form_builder","last_synced_at":"2025-03-15T12:27:39.130Z","repository":{"id":280191397,"uuid":"941239422","full_name":"SamiraSiavash/Form_Builder","owner":"SamiraSiavash","description":"This application is a form builder that receives the field names and default values ​​from the user and creates a simple form using \"Label\" and \"Entry\".","archived":false,"fork":false,"pushed_at":"2025-03-01T21:07:17.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T21:28:09.136Z","etag":null,"topics":["form-builder","form-creator","form-maker","python","tkinter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamiraSiavash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-01T20:20:14.000Z","updated_at":"2025-03-01T21:07:21.000Z","dependencies_parsed_at":"2025-03-01T21:28:11.951Z","dependency_job_id":"1387e607-2005-4283-9c13-fe38958a8e0a","html_url":"https://github.com/SamiraSiavash/Form_Builder","commit_stats":null,"previous_names":["samirasiavash/form_maker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamiraSiavash%2FForm_Builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamiraSiavash%2FForm_Builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamiraSiavash%2FForm_Builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamiraSiavash%2FForm_Builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamiraSiavash","download_url":"https://codeload.github.com/SamiraSiavash/Form_Builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243729375,"owners_count":20338459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["form-builder","form-creator","form-maker","python","tkinter"],"created_at":"2025-03-15T12:27:38.522Z","updated_at":"2025-03-15T12:27:39.114Z","avatar_url":"https://github.com/SamiraSiavash.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Form Maker\n\nThis application is a form builder that receives the field names and default values ​​from the user as long as the user wants and creates a simple form using \"Label\" and \"Entry\".\\\nBy clicking the \"submit\" button, the information is saved in a text file in the project path.\\\nThis project is written in Python and its user interface is implemented by \"tkinter\".\n\n## Code\n```python\nfrom tkinter import Tk, Label, Entry, Button\n\nclass Form:\n    pass\n\ncommision_form = Form()\n\nwhile True:\n    attribute_name = input(\"Please enter attribute name: \")\n    attribute_value = input(\"Please enter attribute value: \")\n\n    setattr(commision_form, attribute_name, attribute_value)\n\n\n    if input(\"Do want continue[Y,N]: \").upper() == \"N\":\n        break\n\nwindow = Tk()\nwindow.title(\"Dynamic Form\")\n\nentry_list = []\n\nrow_number = 0\nfor key, value in commision_form.__dict__.items():\n    label_form = Label(window, text=key)\n    label_form.grid(column=0, row=row_number, pady=5, padx=5)\n\n    entry_form = Entry(window, width=50)\n    entry_form.insert(0, value)\n    entry_form.grid(column=1, row=row_number, pady=5, padx=5)\n\n    entry_list.append({f\"{key}\": entry_form})\n\n    row_number += 1\n\ndef submit():\n    data = \"\"\n    for entry_dict in entry_list:\n        for name, entry in entry_dict.items():\n            data += f\"{name}:{entry.get()},\"\n\n    with open(\"FormData.txt\", mode=\"w\") as file:\n        file.write(data)\n\n    window.destroy()\n\nsubmit_button = Button(window, text=\"Submit\", command=submit)\nsubmit_button.grid(row=row_number, column=1, pady=5, padx=5)\n\nwindow.mainloop()\n```\n\n## Sample\n```python\nPlease enter attribute name: First Name\nPlease enter attribute value: Samira\nDo want continue[Y,N]: y\nPlease enter attribute name: Last Name\nPlease enter attribute value: Siavash\nDo want continue[Y,N]: y\nPlease enter attribute name: Username\nPlease enter attribute value: Siavash1\nDo want continue[Y,N]: y\nPlease enter attribute name: Password\nPlease enter attribute value: 123456\nDo want continue[Y,N]: n\n```\n\n## Result\n![Image](https://github.com/user-attachments/assets/8e1f4e5a-09b7-4d92-9bcd-ceb42636c94b)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamirasiavash%2Fform_builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamirasiavash%2Fform_builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamirasiavash%2Fform_builder/lists"}