{"id":15601196,"url":"https://github.com/hacknlove/semantic-form","last_synced_at":"2026-06-19T10:31:20.798Z","repository":{"id":77996240,"uuid":"66101165","full_name":"hacknlove/semantic-form","owner":"hacknlove","description":"semantic-ui form for Meteor made easy","archived":false,"fork":false,"pushed_at":"2017-06-19T09:55:15.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-26T07:34:20.694Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/hacknlove.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":"2016-08-19T17:45:03.000Z","updated_at":"2016-08-19T17:46:14.000Z","dependencies_parsed_at":"2023-03-12T03:10:09.087Z","dependency_job_id":null,"html_url":"https://github.com/hacknlove/semantic-form","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":"0.18181818181818177","last_synced_commit":"8d8582e2cc149ba3908ca391c58d7c162f0692e4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hacknlove/semantic-form","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fsemantic-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fsemantic-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fsemantic-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fsemantic-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hacknlove","download_url":"https://codeload.github.com/hacknlove/semantic-form/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fsemantic-form/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34528134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-03T02:19:40.340Z","updated_at":"2026-06-19T10:31:20.779Z","avatar_url":"https://github.com/hacknlove.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hacknlove:semantic-form\n\n## use:\n\n### Template\n    {{#semanticForm name=\"foo\" fields=bar ready=baz values=qux}}\n      \u003cform class=\"ui form\"\u003e\n        \u003c!-- only one form inside the semanticForm --\u003e\n        \u003c!-- you have the helpers current, actual and reload --\u003e\n        \u003cdiv class=\"ui error message\"\u003e\u003c/div\u003e \u003c!-- do not forget this--\u003e\n      \u003c/form\u003e\n    {{/semanticForm}}\n\n* `name` (optional but recomended) sets the `_id` of the documents in the Template.semanticForm.current and Template.semanticForm.reload that host the current values in the form and those who has been changed` you must set a name if you want your form keep the values that has been changed in the form but has not been saved, even if the template is destroyed\n* `fields` the fields object to be passed to the `$(form).form({fields: bar})`\n* `ready` semanticForm will wait until `ready` was not falsable\n* `values` has the values with what semanticForm will populate the form widgets by their names\n\n### Events:\n* `success` fired when you submit the form, and it pass the validation\n* `failure` fired when you submit the form, and it does not pass the validation\n\n\n      Template.foo.events({\n        'form success': function (event, instance, data, add) {\n          // data \u003c= $('form').form('get values')\n          // add.prompt('bar') =\u003e mark input as error\n          // add.errors(['bla', 'blabla', ...]) =\u003e  show the errors\n        }\n      })\n\n### Special validation\nOn top of the semantic-ui validations, semantic-form has the `event` validation\n\n**js**\n\n    Template.foo.helpers({\n      values: {...},\n      fields: {\n        bar: {\n          rules: [\n            {\n              type: 'event[baz]',\n              prompt: 'some error message'\n            }\n          ]\n        }\n      }\n    })\n\n    Template.foo.onRendered(function () {\n      this.$('input[name=bar]').on('validate', function (event, instance, param) {\n        // here you can do your custom validation accesing your Template, the doom, whatever you need, but remember that it must be synchronous\n      })\n    })\n\n**html**\n\n    \u003ctemplate name=\"foo\"\u003e\n      {{#semanticForm name=\"qux\" fields=fields ready=true values=values}}\n        \u003cform class=\"ui form\"\u003e\n          \u003cdiv class=\"field\"\u003e\n            \u003clabel\u003eBAR\u003c/label\u003e\n            \u003cinput type=\"text\" name=\"bar\"\u003e\n          \u003c/div\u003e\n          \u003cdiv class=\"ui error message\"\u003e\u003c/div\u003e\n        \u003c/form\u003e\n      {{/semanticForm}}\n    \u003c/template\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhacknlove%2Fsemantic-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhacknlove%2Fsemantic-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhacknlove%2Fsemantic-form/lists"}