{"action":"created","issue":{"url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/204","repository_url":"https://api.github.com/repos/eventespresso/event-espresso-core","labels_url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/204/labels{/name}","comments_url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/204/comments","events_url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/204/events","html_url":"https://github.com/eventespresso/event-espresso-core/issues/204","id":206294580,"number":204,"title":"Custom Question Type","user":{"login":"dysert","id":7999909,"avatar_url":"https://avatars.githubusercontent.com/u/7999909?v=3","gravatar_id":"","url":"https://api.github.com/users/dysert","html_url":"https://github.com/dysert","followers_url":"https://api.github.com/users/dysert/followers","following_url":"https://api.github.com/users/dysert/following{/other_user}","gists_url":"https://api.github.com/users/dysert/gists{/gist_id}","starred_url":"https://api.github.com/users/dysert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dysert/subscriptions","organizations_url":"https://api.github.com/users/dysert/orgs","repos_url":"https://api.github.com/users/dysert/repos","events_url":"https://api.github.com/users/dysert/events{/privacy}","received_events_url":"https://api.github.com/users/dysert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-02-08T19:11:05Z","updated_at":"2017-02-08T19:55:33Z","closed_at":null,"body":"### Is this a bug report?\r\n* [ ] yes\r\n* [x ] no\r\n\r\n### What branch did this occur in?\r\n4.9.28\r\n\r\n### What version of WordPress is on the site this issue happened?\r\n4.7.2\r\n\r\nOn our event registration form,  I have a question for Student ID numbers, which have a format of A00000000 (The char A, followed by 8 digits). How can I make a custom question type for this?\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/comments/278442835","html_url":"https://github.com/eventespresso/event-espresso-core/issues/204#issuecomment-278442835","issue_url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/204","id":278442835,"user":{"login":"tn3rb","id":1751030,"avatar_url":"https://avatars.githubusercontent.com/u/1751030?v=3","gravatar_id":"","url":"https://api.github.com/users/tn3rb","html_url":"https://github.com/tn3rb","followers_url":"https://api.github.com/users/tn3rb/followers","following_url":"https://api.github.com/users/tn3rb/following{/other_user}","gists_url":"https://api.github.com/users/tn3rb/gists{/gist_id}","starred_url":"https://api.github.com/users/tn3rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tn3rb/subscriptions","organizations_url":"https://api.github.com/users/tn3rb/orgs","repos_url":"https://api.github.com/users/tn3rb/repos","events_url":"https://api.github.com/users/tn3rb/events{/privacy}","received_events_url":"https://api.github.com/users/tn3rb/received_events","type":"User","site_admin":false},"created_at":"2017-02-08T19:55:33Z","updated_at":"2017-02-08T19:55:33Z","body":"ahhh kk... \r\nyou can see the list of existing EE input types in the ` core/libraries/form_sections/inputs/ ` folder,\r\nand a list of \"normalization\" strategies in ` core/libraries/form_sections/strategies/normalization/ `\r\n\r\nSo the first thing you are going to want to do is create a new normalization strategy that uses some sort of regex to validate and sanitize your input to ensure that it matches what you want.\r\n\r\nThen, your best bet would be to extend the ` EE_Text_Input ` class and override  what normalization strategy is set for that input type., and use the new one you just created.\r\n\r\nFinally, check out this snippet which shows you how to inject your new input type into the rest of EE:\r\nhttps://github.com/eventespresso/ee-code-snippet-library/blob/master/checkout/mn_add_question_type.php"}}
{"actor":{"display_login":"tn3rb"}}