Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0301· OpenAIAi2 WildChat-4.8M (AI2)

Instrument: должен быть скрыт в профиле, если выбрана роль band. Однако, при регистрации…

  1. User

    Instrument: должен быть скрыт в профиле, если выбрана роль band. Однако, при регистрации в профиле текст Instrument: остается пустым, когда должно быть скрыто полностью. p.s: пожалуйста, используй квадратные кавычки, иначе мой код не будет работать

    profile.ejs:

    <% } %>

    register.ejs:

    Role

    Genre

    Instrument

    SoundCloud URL

    Password

    Location

    Login

    Thumbnail

    Register

  2. 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.