Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

88
Visualizações
Add commenting box on click of button

I'd like to add some HTML code to my page when a button is clicked this is what I'd like to add

    <form action="#" id="Reactie_form">
        <input id="Form_voornaam" type="text" placeholder="Voornaam" style="width: 50%"> <br>
        <input id="Form_achternaam" type="text" placeholder="Achternaam" style="width: 50%"><br>
        <input id="Form_email" type="email" placeholder="E-mail" style="width: 50%">
        <textarea id="Form_bericht" style="width: 100%"></textarea>
        <input id="files" type="file" @change="fileSelected" multiple accept=".png, .jpg, .webp, jpeg, .gif">
        <input type="button" class="sendButt" value="Verstuur" @click="submitReactie">
    </form>
    <span v-if="!files || !files.length"></span>
    <ul v-else>
        <li v-for="files in files" :key="files.name">{{ files.name }}</li>
    </ul>

Thanks

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I see you're using VueJS. This makes something like this easy!

How I would do it is as follows:

add the following to your data() : isClicked: false

wrap your code into a container like this:

<div v-if='isClicked'>
    <form action="#" id="Reactie_form">
        <input id="Form_voornaam" type="text" placeholder="Voornaam" style="width: 50%"> <br>
        <input id="Form_achternaam" type="text" placeholder="Achternaam" style="width: 50%"><br>
        <input id="Form_email" type="email" placeholder="E-mail" style="width: 50%">
        <textarea id="Form_bericht" style="width: 100%"></textarea>
        <input id="files" type="file" @change="fileSelected" multiple accept=".png, .jpg, .webp, jpeg, .gif">
        <input type="button" class="sendButt" value="Verstuur" @click="submitReactie">
    </form>
    <span v-if="!files || !files.length"></span>
    <ul v-else>
        <li v-for="files in files" :key="files.name">{{ files.name }}</li>
    </ul>
</div>

and at the following to your button: <button @click='isClicked = true'>

over 4 years ago · Santiago Trujillo Relatório

0

Wrap your code and add the wrapper container a hidding class. then you can fetch the click event and toggle the css by javascript.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda