{"action":"created","issue":{"url":"https://api.github.com/repos/edx/edx-platform/issues/10413","labels_url":"https://api.github.com/repos/edx/edx-platform/issues/10413/labels{/name}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/10413/comments","events_url":"https://api.github.com/repos/edx/edx-platform/issues/10413/events","html_url":"https://github.com/edx/edx-platform/pull/10413","id":113954559,"number":10413,"title":"Add custom dropdown to registration menu.","user":{"login":"Kelketek","id":1099483,"avatar_url":"https://avatars.githubusercontent.com/u/1099483?v=3","gravatar_id":"","url":"https://api.github.com/users/Kelketek","html_url":"https://github.com/Kelketek","followers_url":"https://api.github.com/users/Kelketek/followers","following_url":"https://api.github.com/users/Kelketek/following{/other_user}","gists_url":"https://api.github.com/users/Kelketek/gists{/gist_id}","starred_url":"https://api.github.com/users/Kelketek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kelketek/subscriptions","organizations_url":"https://api.github.com/users/Kelketek/orgs","repos_url":"https://api.github.com/users/Kelketek/repos","events_url":"https://api.github.com/users/Kelketek/events{/privacy}","received_events_url":"https://api.github.com/users/Kelketek/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/edx/edx-platform/labels/open-source-contribution","name":"open-source-contribution","color":"bfe5bf"},{"url":"https://api.github.com/repos/edx/edx-platform/labels/waiting%20on%20author","name":"waiting on author","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2015-10-29T00:28:26Z","updated_at":"2015-11-10T17:50:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/10413","html_url":"https://github.com/edx/edx-platform/pull/10413","diff_url":"https://github.com/edx/edx-platform/pull/10413.diff","patch_url":"https://github.com/edx/edx-platform/pull/10413.patch"},"body":"**Background**: This PR adds the ability for an instance to specify an additional custom dropdown menu on the registration form. It is backwards compatible, and by default, the form is not added in. The field can be set as hidden, optional, or required just like other fields on the registration form. In the screenshots, the option for it to be required is shown so that error handling is also shown. The example configuration has the dropdown prompt the user how they heard of the service.\r\n\r\nOld registration form:\r\n<img width=\"641\" alt=\"dropdown_old\" src=\"https://cloud.githubusercontent.com/assets/1099483/10927184/42355cfa-8263-11e5-9014-7cd9665a7fd2.png\">\r\nWith error:\r\n<img width=\"652\" alt=\"error_old_reg\" src=\"https://cloud.githubusercontent.com/assets/1099483/10927193/4db57c18-8263-11e5-9b15-6c43b98f402f.png\">\r\n\r\nLogistration form:\r\n<img width=\"1121\" alt=\"combined\" src=\"https://cloud.githubusercontent.com/assets/1099483/10927205/6ba4659a-8263-11e5-954c-9eda76243a2a.png\">\r\nWith error:\r\n<img width=\"566\" alt=\"combined_error\" src=\"https://cloud.githubusercontent.com/assets/1099483/10927218/8104bf48-8263-11e5-9f74-9245b0f214df.png\">\r\n\r\nThe new settings that can be used to work with these changes are:\r\n\r\n```\r\nREGISTRATION_DROPDOWN_LABEL = 'How did you hear of us?'\r\nREGISTRATION_DROPDOWN_MISSING_ERROR = 'You must select how you heard of us.'\r\nREGISTRATION_DROPDOWN_CHOICES = (\r\n    ('search', 'Search Engine'),\r\n    ('friend', 'Referred by a Friend'),\r\n    ('other', 'Other'),\r\n)\r\n\r\n# Existing setting, just with additional key\r\nREGISTRATION_EXTRA_FIELDS = {\r\n    ...\r\n    'dropdown': 'hidden', # or 'optional', or 'required'\r\n    ...\r\n}\r\n```\r\n\r\n**Partner information**: not an edX partner - 3rd party-hosted open edX instance\r\n\r\nCompanion config PR: https://github.com/edx/configuration/pull/2443\r\n\r\nThe following is a configuration comment to signal our automated sandbox provisioner:\r\n\r\n- - -\r\n**Settings**\r\n```yaml\r\nEDXAPP_REGISTRATION_EXTRA_FIELDS:\r\n    level_of_education: 'optional'\r\n    gender: 'optional'\r\n    year_of_birth: 'optional'\r\n    mailing_address: 'optional'\r\n    goals: 'optional'\r\n    honor_code: 'required'\r\n    terms_of_service: 'hidden'\r\n    city: 'hidden'\r\n    country: 'hidden'\r\n    dropdown: 'required'\r\n```"},"comment":{"url":"https://api.github.com/repos/edx/edx-platform/issues/comments/155512137","html_url":"https://github.com/edx/edx-platform/pull/10413#issuecomment-155512137","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/10413","id":155512137,"user":{"login":"sarina","id":1985317,"avatar_url":"https://avatars.githubusercontent.com/u/1985317?v=3","gravatar_id":"","url":"https://api.github.com/users/sarina","html_url":"https://github.com/sarina","followers_url":"https://api.github.com/users/sarina/followers","following_url":"https://api.github.com/users/sarina/following{/other_user}","gists_url":"https://api.github.com/users/sarina/gists{/gist_id}","starred_url":"https://api.github.com/users/sarina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarina/subscriptions","organizations_url":"https://api.github.com/users/sarina/orgs","repos_url":"https://api.github.com/users/sarina/repos","events_url":"https://api.github.com/users/sarina/events{/privacy}","received_events_url":"https://api.github.com/users/sarina/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T17:50:07Z","updated_at":"2015-11-10T17:50:07Z","body":"@antoviaque - yes, if you can put the framework in place for it to be extended to other types in the future, and enable it such that multiple new fields can be added, that would be good.\r\n\r\nWe should discuss a naming convention for the fields. `'dropdown'` is a particularly poor choice of naming here, especially given that's an LMS problem type! I would think a convention such as `custom_regfield_##` would probably suffice"}}