{"id":25565811,"url":"https://github.com/thomasdev-de/jquery-form","last_synced_at":"2026-01-26T22:45:52.783Z","repository":{"id":150569298,"uuid":"486751997","full_name":"ThomasDev-de/jquery-form","owner":"ThomasDev-de","description":"A jQuery plugin for forms","archived":false,"fork":false,"pushed_at":"2024-06-23T16:07:52.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-18T01:06:45.879Z","etag":null,"topics":["ajax","bootstrap","form","form-validation","javascript","jquery","jquery-plugin"],"latest_commit_sha":null,"homepage":"","language":null,"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/ThomasDev-de.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":"2022-04-28T21:22:26.000Z","updated_at":"2023-09-15T08:21:49.000Z","dependencies_parsed_at":"2024-03-28T08:27:10.411Z","dependency_job_id":"dcbb65cd-14c9-4da5-91a7-1917660c7373","html_url":"https://github.com/ThomasDev-de/jquery-form","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasDev-de%2Fjquery-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasDev-de%2Fjquery-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasDev-de%2Fjquery-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasDev-de%2Fjquery-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThomasDev-de","download_url":"https://codeload.github.com/ThomasDev-de/jquery-form/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239921844,"owners_count":19718844,"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":["ajax","bootstrap","form","form-validation","javascript","jquery","jquery-plugin"],"created_at":"2025-02-20T22:15:05.585Z","updated_at":"2026-01-26T22:45:52.744Z","avatar_url":"https://github.com/ThomasDev-de.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# jquery-form\n\nA jQuery plugin for forms\n\n## REQUIREMENTS\n\n- bootstrap \u003e= 5.0\n- jQuery \u003e= 3.6\n\n## USAGE\n\n```html\n\u003cform action=\"/path/to/action\" method=\"post\" id=\"form_example\"\u003e\n    \u003cinput type=\"text\" required class=\"form-control\" name=\"name\"\u003e\n\u003c/form\u003e\n\n\u003cscript src=\"dist/jquery.form.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    $('#form_example').form(options);\n\u003c/script\u003e\n```\n\n## OPTIONS\n\n```js\nconst DEFAULTS = {\n    autocomplete: false, // Sets all input fields to autocomplete off\n    resetOnModalHidden: true, // If the form element is in a modal, it will be reset after the modal is hidden\n    onBeforeSend: function(form, xhr){},\n    onSuccess: function(form, response){},\n    onError: function(form, errors){},\n    onComplete: function(form, response){},\n    onCleared: function(form){},\n    onReset: function(event, form){},\n    onInit: function(form){},\n}\n```\n\n## EVENTS\n```javascript\n$(document)\n    .on('success', '#form_example', function (event, $form, responseJSON) {\n        // do something\n    })\n    .on('error', '#form_example', function (event, $form, responseJSON, xhr) {\n        // do something\n    })\n    .on('beforeSend', '#form_example', function (event, xhr, $form, aborted) {\n        // do something\n    })\n    .on('complete', '#form_example', function (event, $form, responseJSON) {\n        // do something\n    })\n    .on('cleared', '#form_example', function (event, $form) {\n        // do something\n    })\n    .on('resetting', '#form_example', function (event, $form) {\n        // do something\n    })\n    .on('init', '#form_example', function (event, $form) {\n        // do something\n    })\n    .on('error', '#form_example [name=\"name\"]', function (e, $inputElement, message) {\n        // do something\n    })\n    .on('any', '#form_example', function (e, eventName) {\n        // do something\n    });\n```\n\n## Methods\n```javascript\nconst form = $('form').form('setErrors', {email: 'not valid', password: 'is required'});\n```\n\n## ERROR HANDLING\n\nThe plugin expects error messages as JSON object.  \nThe key must match the input name field, and the value should contain the error message.  \nExample:\n\n```json\n{\n  \"first_name\": \"This field must not be empty\",\n  \"email\": \"This is not a valid email address\",\n  \"password_repeat\": \"The password repetition does not match\"\n}\n```\nIf the errors are returned properly, the plugin will bring up the error messages in the correct place   \nand the input fields will be marked as invalid.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasdev-de%2Fjquery-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasdev-de%2Fjquery-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasdev-de%2Fjquery-form/lists"}