Skip to content

Commit

Permalink
Update app/views/schools/_form.html.erb
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Ball <[email protected]>
  • Loading branch information
ArushC and cycomachead authored Apr 12, 2024
1 parent 38b2ce1 commit 9914438
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/views/schools/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,10 @@
function handleCountryChange() {
if (countrySelected.val() === 'US') {
stateSelectContainer.show();
stateSelect.attr('required', '') //make state select required
stateSelect.attr('name', 'school[state]');.attr('required', '') // make state select required

stateTextfieldContainer.hide();

stateTextfield.removeAttr('name');
stateSelect.attr('name', 'school[state]');

} else {
stateTextfieldContainer.show();
stateSelect.removeAttr('required')
Expand Down

0 comments on commit 9914438

Please sign in to comment.