Instrument: должен быть скрыт в профиле, если выбрана роль band. Однако, при регистрации…
- User
Instrument: должен быть скрыт в профиле, если выбрана роль band. Однако, при регистрации в профиле текст Instrument: остается пустым, когда должно быть скрыто полностью. p.s: пожалуйста, используй квадратные кавычки, иначе мой код не будет работать
profile.ejs:
<% } %>
register.ejs:
Role
Genre
Instrument
SoundCloud URL
Password
Location
Login
Thumbnail
Register
- Assistant
The issue seems to be that the Instrument field is still being displayed in the registration form even when the role selected is Band, even though it should be hidden. To fix this, the code for the Instrument field should be updated in the register.ejs file by adding a conditional statement to hide it when the Band role is selected.
Here's the updated code for the Instrument section in register.ejs:
Instrument <% if (role === ‘Artist’) { %>
This updates the code to only display the Instrument field when the role selected is Artist and hide it when the role is Band.