{"id":19811114,"url":"https://github.com/accenture/mendix.inputtypesetter","last_synced_at":"2025-02-28T13:19:24.530Z","repository":{"id":48013518,"uuid":"189211377","full_name":"Accenture/Mendix.InputTypeSetter","owner":"Accenture","description":"Mendix Text Box widget always sets input type to \"text\" (or \"password\" for Hashed strings). This widget fixes this to \"number\" for numeric fields. You can also set any attribute values using CSS classes like \"set-type-email\" or \"set-min-0\".","archived":false,"fork":false,"pushed_at":"2022-12-03T11:27:37.000Z","size":4009,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-01-11T07:12:14.417Z","etag":null,"topics":["mendix","mendix-widget"],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Accenture.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2019-05-29T11:22:26.000Z","updated_at":"2024-02-15T11:41:00.000Z","dependencies_parsed_at":"2023-01-22T15:50:12.503Z","dependency_job_id":null,"html_url":"https://github.com/Accenture/Mendix.InputTypeSetter","commit_stats":null,"previous_names":["accenture/mendix.inputtypesetter"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2FMendix.InputTypeSetter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2FMendix.InputTypeSetter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2FMendix.InputTypeSetter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2FMendix.InputTypeSetter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Accenture","download_url":"https://codeload.github.com/Accenture/Mendix.InputTypeSetter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241156591,"owners_count":19919338,"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":["mendix","mendix-widget"],"created_at":"2024-11-12T09:24:48.065Z","updated_at":"2025-02-28T13:19:24.504Z","avatar_url":"https://github.com/Accenture.png","language":"CSS","readme":"# Input Type Setter\n\nMendix Text Box widget always sets `input.type` to `\"text\"` (or `password` for Hashed strings). This widget fixes this issue by setting it to `\"number\"` for **numeric fields** (of type Integer, Long and Decimal).\n\nYou can also set **any** other `type` (or other attributes) value of `input` tags using CSS classes like `\"set-type-email\"` or `\"set-min-0\"`.\n\nAdditionally, it fixes another issue with missing `label.for=\"{related-input.id}\"` in horizontal form orientation.\n\n## Typical usage scenario\n\nIt's useful especially for [mobile applications where keyboard type depends](http://mobileinputtypes.com/) on `input.type`, e.g.:\n- **numeric keyboard** for `input.type=\"number\"`\n- **phone keyboard** for `input.type=\"tel\"`\n- **email keyboard** (with `@` and `.com` keys) for `input.type=\"email\"`\n- **url keyboard** (with `/` and `.com` keys) for `input.type=\"url\"`\n\n\n## Usage\n\nPlace the widget on your form page and provide the first settings:\n- **Widgets selector**: Selector of widget elements wrapping input tags to change.\n  - Default setting affects all Text Box widgets: `\"div.form-group[class*=mx-name-textBox]\"`.\n  - You can e.g. extend it for other widgets by removing \"class begins with\" extension: `\"div.form-group\"`\n\nThis setting alone is enough for changing `input.type` to `\"number\"` for **numeric fields** (of type Integer, Long and Decimal).\n\nIf you need to use other `input.type` (e.g. `\"email\"` or `\"phone\"`) or to set other attributes (e.g. `min`, `max`, `step` that make sense for `\"number\"` and `\"range\"` inputs), **add special CSS classes to related input widgets**. The class name format is:\n```\n[\u003cprefix\u003e]\u003cattributeName\u003e\u003cseparator\u003e\u003cvalue\u003e\n```\nThe `\u003cprefix\u003e` is optional, so it may be omitted:\n```\n\u003cattributeName\u003e\u003cseparator\u003e\u003cvalue\u003e\n```\nAnd configure two further settings:\n- **CSS classes prefix** for `\u003cprefix\u003e`,\n- **Parts separator** for `\u003cseparator\u003e`.\n\nBy default, `\u003cprefix\u003e` is `\"set-\"` and `\u003cseparator\u003e` is `\"-\"`, so for example:\n- using class `\"set-type-email\"` will set attribute `type` to `\"email\"`\n- using class `\"set-min-0\"` will set attribute `min` to `\"0\"`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccenture%2Fmendix.inputtypesetter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faccenture%2Fmendix.inputtypesetter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccenture%2Fmendix.inputtypesetter/lists"}