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

150
Visualizações
Change both placeholder and value of BootStrapVue forms via innerHTML

Let's suppose we have defined a simple form using bootstrapvue with only one field:

 <div id="myForm">
    <b-form-group horizontal :label-cols="4" required label="Specify the date"> 
          <b-form-datepicker v-model.trim="date"></b-form-datepicker>
        </b-form-group>
</div>

When a certain button is clicked in my application, a JavaScript function gets invoked (let's call it functA). What I'm trying to do is, change both the value and placeholder of the date field in the form (via innerhtml).

So it would be something like this:

functA(newPlaceHolder) {   //This function's intended behavior is to change the date field placeholder in the form
document.getElementById("myForm").innerHTML=' [...]change the placeholder of the attribute *date* so that it uses the one passed as parameter to the function';

}

How could this be done? I've tried several things before, but none of them working.

Thank you very much for your attention.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I think you are referring to the div by calling getElementById, however, the div is not a placeholder for text so you should call getElementById("").innerHTML on an attribute that holds text.

about 4 years ago · Juan Pablo Isaza 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