{"id":16364828,"url":"https://github.com/djhi/meteor-autoform-materialize","last_synced_at":"2025-07-17T00:37:00.298Z","repository":{"id":27384993,"uuid":"30861011","full_name":"djhi/meteor-autoform-materialize","owner":"djhi","description":"DEPRECATED - Meteor AutoForm Materialize templates","archived":false,"fork":false,"pushed_at":"2017-04-06T21:16:15.000Z","size":112,"stargazers_count":47,"open_issues_count":3,"forks_count":29,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T15:52:23.461Z","etag":null,"topics":["autoform","javascript","meteor"],"latest_commit_sha":null,"homepage":"https://atmospherejs.com/mozfet/autoform-materialize","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"wdxzs1985/Astrum","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/djhi.png","metadata":{"files":{"readme":"README.md","changelog":"history.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-16T09:14:39.000Z","updated_at":"2023-01-10T21:44:04.000Z","dependencies_parsed_at":"2022-08-24T23:50:21.779Z","dependency_job_id":null,"html_url":"https://github.com/djhi/meteor-autoform-materialize","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/djhi/meteor-autoform-materialize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djhi%2Fmeteor-autoform-materialize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djhi%2Fmeteor-autoform-materialize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djhi%2Fmeteor-autoform-materialize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djhi%2Fmeteor-autoform-materialize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djhi","download_url":"https://codeload.github.com/djhi/meteor-autoform-materialize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djhi%2Fmeteor-autoform-materialize/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265554982,"owners_count":23787311,"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":["autoform","javascript","meteor"],"created_at":"2024-10-11T02:32:20.146Z","updated_at":"2025-07-17T00:37:00.274Z","avatar_url":"https://github.com/djhi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Meteor Autoform Materialize templates\n=========================\nDEPRECATED - Adds [materialize](http://materializecss.com/) templates for autoform.\n\n\u003e **Important** - I no longer use Meteor and won't be updating this project anymore.\nPlease use https://github.com/mozfet/meteor-autoform-materialize which will be updated. Thanks to @mozfet for taking over this project.\n\n## Setup\n\n1. `meteor add gildaspk:autoform-materialize`\n2. In a client file (ex: `/client/config/autoform.js`)\n  ```\n  AutoForm.setDefaultTemplate('materialize');\n  ```\n\nYou must add materialize CSS and JavaScript yourself. Some packages can help:\n\n- [materialize:materialize](https://atmospherejs.com/materialize/materialize) `meteor add materialize:materialize`\n- [poetic:materialize-scss](https://atmospherejs.com/poetic/materialize-scss) `meteor add poetic:materialize-scss`\n\n## Usage and demo\n\nYou can checkout [the playground](https://github.com/djhi/meteor-autoform-materialize-playground) which is running [here](http://autoform-materialize-playground.meteor.com/).\n\n## Additional type\n\n### PickADate\nMaterialize uses [pickadate](https://github.com/amsul/pickadate.js) for date inputs.\n\nYou can apply it directly in your template:\n\n```\n{{\u003e afFieldInput name='dateFieldName' type=\"pickadate\"}}\n```\n\nYou can also specify it at the schema level:\n```\nMySchema = new SimpleSchema({\n  dateFieldName: {\n    type: Date\n    autoform: {\n      type:\"pickadate\"\n    }\n  }\n});\n```\n#### Choosing a Timezone\n\nBy default, the field's value will be a `Date` object representing the selected date and time in the browser's timezone (i.e., based on the user's computer time settings). In most cases, you probably want the `Date` object relative to some other timezone that you have previously stored. For example, if the form is setting the start date of an event, you want the date to be relative to the event venue's timezone. You can specify a different IANA timezone ID by adding a `timezoneId` attribute.\n\n```js\n{\n  date: {\n    type: Date,\n    autoform: {\n      type: \"pickadate\",\n      timezoneId: \"America/New_York\"\n    }\n  }\n}\n```\n\nOr:\n\n```js\n{{\u003e afFieldInput name=\"typeTest\" type=\"pickadate\" timezoneId=\"America/New_York\"}}\n```\n\n#### Automatic Type Conversions\n\nThis input type is intended to be used with `type: Date` schema keys, but it also works with other schema types. Here's a list:\n\n* `Date`: Value is stored as a `Date` object representing the selected date and time in the timezone you specified with the `timezoneId` attribute. By default, the timezone is that of the browser (i.e., the user's computer time settings).\n* `String`: Value is stored as a string representation of the selected date in ISO format, e.g., \"2014-11-25T00:00:00\".\n* `Number`: Value is stored as the result of calling `getTime()` on the `Date` object (representing the selected date and time in the timezone you specified).\n* `Array`: If the schema expects an array of `Date` or `String` or `Number`, the value is converted to a one-item array and stored.\n\nTo provide pickadate options, set a `pickadateOptions` attribute equal to a helper that returns the options object.\n\n### Switch\n\nYou an also use [switches](http://materializecss.com/forms.html#switches)\n\nAt the template level:\n```\n{{\u003e afFieldInput name='dateFieldName' type=\"switch\"}}\n```\n\nAt the schema level:\n```\nMySchema = new SimpleSchema({\n  booleanFieldName: {\n    type: Boolean\n    autoform: {\n      type:\"switch\"\n    }\n  }\n});\n```\n\nYou may specify the `trueLabel` or `falseLabel` options to customize the switch.\n\nAt the template level:\n```\n{{\u003e afFieldInput name='dateFieldName' type=\"switch\" trueLabel=\"Online\" falseLabel=\"Offline\"}}\n```\n\nAt the schema level:\n```\nMySchema = new SimpleSchema({\n  booleanFieldName: {\n    type: Boolean\n    autoform: {\n      type:\"switch\"\n      trueLabel:\"Online\"\n      falseLabel:\"Offline\"\n    }\n  }\n});\n```\nIf you need other values than boolean, you may specify the `trueValue` or `falseValue` options to customize the switch.\n\nAt the template level:\n```\n{{\u003e afFieldInput name='dateFieldName' type=\"switch\" trueValue=\"online\" falseValue=\"offline\"}}\n```\n\nAt the schema level:\n```\nMySchema = new SimpleSchema({\n  booleanFieldName: {\n    type: Boolean\n    autoform: {\n      type:\"switch\"\n      trueValue:\"online\"\n      falseValue:\"offline\"\n    }\n  }\n});\n```\n\n### Input with prepended icon\nYou can add icon to any field like this:\n```\n{{\u003e afQuickField name='subject' icon='person'}}\n```\nFor blank space in place of icon, just use \"none\":\n```\n{{\u003e afQuickField name='subject' icon='none'}}\n```\n\nIt also works for textarea:\n```\n{{\u003e afQuickField name='message' type='textarea' icon='person'}}\n```\n\n# Troubleshooting\n\n## Extra carets on selects\n\nThis happen when using materialize version `0.97.0`. A fix has been released with version `0.97.1` but there are other issues.\n\nYou should use `poetic:materialize-scss` until those problems are corrected.\n\n## Contributors\n- Gildas Garcia (@djhi)\n- Razvan Teslaru (@rteslaru)\n- Chun Yang (@Chun-Yang)\n\n## License\nautoform-materialize is licensed under the [MIT Licence](LICENSE), courtesy of [marmelab](http://marmelab.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjhi%2Fmeteor-autoform-materialize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjhi%2Fmeteor-autoform-materialize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjhi%2Fmeteor-autoform-materialize/lists"}